Converting Date Format in Groovy
Hi
I have two fields (TravelDate and DepartureDate)
TravelDate data type - TimeStamp (yyyy-mm-dd hh:mm:ss)
Departure data type - TimeStamp (dd/mm/yyyy)
We have a requirement of comparing TravelDate and DepartureDate.
We are trying to compare the dates using groovy. Since groovy we are unable to pass to_date(substr ('2012-03-27 12:00:00',1,10),'dd/MM/yyyy') . It doesn't convert and instead it says substr name not found
Can anyone help to convert yyyy-mm-dd hh:mm:ss to dd/mm/yyyy in groovy ?
Thanks in Advance,
KR