I’m trying to reformat the following DateTime: ‘Fri Mar 13 13:00:52 -0700 2009’ to be ‘2009-03-13 13:00:42’, but can’t quite seem to get it. I’ve tried strftime(‘%a %b %d %H %M %S -0700 %Y’) amongst other things and google isn’t helping…
It is not necessary to use double quotes, single quotes are ok. It is only a string.
Regards
Senthil Raja S P
I’m trying to reformat the following DateTime: ‘Fri Mar 13 13:00:52 -0700 2009’ to be ‘2009-03-13 13:00:42’, but can’t quite seem to get it. I’ve tried strftime(‘%a %b %d %H %M %S -0700 %Y’) amongst other things and google isn’t helping…
What is it that you are calling strftime on (show us some code), and what result do you get when you call it as you have shown?
I'm trying to reformat the following DateTime: 'Fri Mar 13 13:00:52
-0700
2009' to be '2009-03-13 13:00:42', but can't quite seem to get it. I've
tried strftime('%a %b %d %H %M %S -0700 %Y') amongst other things and
google
isn't helping...
Any advice?
If the value is array or string, first convert that into datetime format
and try with using strftime(needed format).