You need to sign in to do that
Don't have an account?
aravindaaaa
Handling UTC DateTime in Apex
Hi,
SInce I'm new to Apex development, I'm not quite sure how to handle a UTC datetime like '2012-04-23T14:54:29+05:30' . I just wanted to display the above value as Apr 23, 2012 2:54 PM to the user.
I tried datetime.getInstance('2012-04-23T14:54:29+05:30') and it threw an error saying "Invalid Date/Time" .
Any pointers on how to use the datetime class to do the above task can be helpful. Thanks.
All Answers
Thanks for the quick response sai.sf . Just wanted to know if removing the timezone difference from the datetime string is a good idea? If any of my salesforce users views the data from a different timezone, isn't he going to see a conflicting time? Please let me know.