function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
downloadingdownloading 

ISO Time

Hi , 

 

I would like to display the current Time which follows to ISO standard representation.

 

could anyone help me the way i could achieve this,

 

Thank You 

Navatar_DbSupNavatar_DbSup

Hi,

 

You can create a text property and assign the converted date into that property after that display on th Vf page.

 

For reference the below code:

system.debug('____system.now____'+system.now());

datetime myDateTime = datetime.now();

string mydtstring = mydatetime.format('yyyy-MM-dd\'T\'hh:mm:ss\'Z\'');

system.debug('____mydtstring____'+mydtstring);

 

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.