Convert Text to Date

ta5ta5 Member Posts: 1,164
Hi
Whats best to convert a string (yyyymmdd) to a date?
Btw: It works when I first prepare a new string to ddmmyyyy and then use the evaluate statement on the new string. But I'm not sure whether this works on all work stations (country settings...).

Thanks in advance
Thomas

Answers

  • ara3nara3n Member Posts: 9,257
    ddmmyyyy would not work in US. evaluate would inteperts it as mmddyyyy. and it would error and get the wrong date.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ta5ta5 Member Posts: 1,164
    thanks!
    so its better to use dmy2date?
    thomas
  • krikikriki Member, Moderator Posts: 9,118
    ha5 wrote:
    thanks!
    so its better to use dmy2date?
    thomas
    Always better, because the other always depends on the regional settings of the PC.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • ta5ta5 Member Posts: 1,164
    thanks =D>
  • ara3nara3n Member Posts: 9,257
    welcome. :P
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.