2 Replies Latest reply: Apr 17, 2012 8:51 AM by Henric Cronström RSS

    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

        • Calendar Issue
          Rajni Batra

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

            • Re: Calendar Issue
              Henric Cronström

              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