Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calendar Issue

I have date in text format eg- 1-jul-2011how to convet this date in date format eg-01-07-2011, so that i can link it with master calendar

2 Replies
rajni_batra
Specialist
Specialist

date(currentdatefield,'DD-MM-YYYY')  as Newdate

hic
Former Employee
Former Employee

If you have the date in a text format (e.g. loaded from a text file) then you first need to convert the text to a number using the date#() -function:

date#( <field>, 'DD-MMM-YYYY' ).

The MMM format code will match the three letter month names as defined in your MonthNames variable, e.g.:

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

If you in a second step want to format the date in a different way, you should use the date() -function outside the date#() -function:

date( date#( <field>, 'DD-MMM-YYYY' ), 'DD/MM/YY' ).

/HIC