Options

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

  • Options
    ara3nara3n Member Posts: 9,256
    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
  • Options
    ta5ta5 Member Posts: 1,164
    thanks!
    so its better to use dmy2date?
    thomas
  • Options
    krikikriki Member, Moderator Posts: 9,090
    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!


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


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