datevalue function takes a date as a text (or string) as input and returns outpu

datevalue function takes a date as a text (or string) as input and returns output as Date object (if the input text is a valid date text)
input format dd/mm/yyyy - this format works perfect.

but if I give the input as dd-mm-yyyy (for ex: datevalue("9-6-2009") - this returns output as "6/9/2009" . Why the month and date are interchanged in the output ?

OriginalPostID-174659

OriginalPostID-174659

  Discussion posts and replies are publicly visible

Parents
  • this works . but I don't see a function that validates a date (given input as string) for any formats like mm.dd.yyyy
    for example datevalue("3.4.2012") - returns 1/4/2035 which is incorrect.
    datevalue("22-Aug-2012") - returns 8/22/2012 which is perfect but datevalue("32-Aug-2012") returns "5/6/1153" which is incorrect . I see there are some gaps needs to get addressed in Date and Time functions
Reply
  • this works . but I don't see a function that validates a date (given input as string) for any formats like mm.dd.yyyy
    for example datevalue("3.4.2012") - returns 1/4/2035 which is incorrect.
    datevalue("22-Aug-2012") - returns 8/22/2012 which is perfect but datevalue("32-Aug-2012") returns "5/6/1153" which is incorrect . I see there are some gaps needs to get addressed in Date and Time functions
Children
No Data