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

Help with parsing date to string
Hi Everyone,
I used the function valueOf as following
Date date1 = Date.Today(); String abc = valueOf(date1);
But I get the following error
Error: Compile Error: Method does not exist or incorrect signature: valueOf(Date) at line 10 column 28.
Can someone point me the error. I checked the syntax in the salesforce system calls list and it is the same as the one I used.
If you want to parse to string then do it like this
Date date1 = Date.Today();
String abc = String.valueOf(date1);
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
All Answers
If you want to parse to string then do it like this
Date date1 = Date.Today();
String abc = String.valueOf(date1);
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Hi souvik,
Thanks for the solution.