This content has been marked as final. Show 4 replies
Does anyone have solution for converting dates in groovy??
What is your exact use case?
you should be able to use SimpleDateFormat in Groovy to format a date http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html. As John said though, the use case matters
I resolved the problem.
First of all, I am very thankful to my colleagues Arun, kamal and LNP because they are the ones helped me in getting solution for this problem.
I created a transient attribute(TravelDate_Temp) at the View Object which is of type String and changed the format in bundle properties to the date format i want. In the select query, i obtained values as to_char(column_name,'date format') then in the bind variable i gave a try catch groovy TravelDate_Temp.substring(0,10); and changed the type of departure_date to String.
Then i compared in the view criteria using equals operator.
I really appreciate your response John :) and thanks to Frank for sharing the info :)