Convert 8 July 2013 to 7/8/2013


(Ameyasoft) #1

I need to convert date 8 July 2013 to 7/8/2013 format. Any solution?


(Stefan Armbruster) #2

use apoc.date.parse/format.


(Andrew Bowman) #3

More specifically the APOC function call would be:

return apoc.date.parse('8 July 2013', 'ms', 'dd MMMM yyyy')

(Ameyasoft) #4

Thanks Stefan and Andrew for the suggestions. This worked for me:

return apoc.date.format(apoc.date.parse('8 July 2013', 'ms', 'dd MMMM yyyy'), 'ms', 'MM/dd/yyyy')

Result: 07/08/2013