You need to sign in to do that
Don't have an account?

How to convert a date string format
Hi,
I'm trying to convert the Datetime function to a string format in Apex code using the following command but it displays incorrect date like this: 51/30/2010. Any ideas? Please help.
Datetime.now().format(
Thanks,
Paul
'mm/dd/yyyy')
Try Datetime.now().format('MM/dd/yyyy')
Mark this as accepted solution if you find the this as solution.
Thank you so much. It works.