4 Replies Latest reply: Jan 8, 2014 12:53 PM by Christian Ventrigli RSS

    Weekday function is giving the wrong result



      When using the weekday function I get the wrong result.


      For example: for  31-12-2013 the result is Sunday instead of Tuesday.


      In the script the following lines are included

        SET DateFormat='DD-MM-YYYY';

        SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';

        SET DayNames='sa;su;mo;tu;we;th;fr';


      Some of the formulaes I tried are (where datum is the date field):

      • WeekDay(Datum)
      • date#(WeekDay(Datum),'ddmmyyyy')
      • date#(WeekDay(Datum),'www')
      • date#(WeekDay(Datum),'dd-mm-yyyy')

      All giving the same wrong result.


      What am I doing wrong?