Date string to date function

  1. 5 years ago

    Joel_Eisenstat

    6 Jan 2019 User since 2016

    Converting a date to string is easy enough but string to date is problematic.

    var st = Date(start,"yyyy-MM-dd hh:mm","EST"); // convert back to date object

    start is string ----> 2019-01-08 07:00:00 +0000
    However st keeps giving the system date / time .
    Any direction is appreciated .
    Thanks
    Joel

  2. marco

    8 Jan 2019 Administrator User since 2016

    @Joel_Eisenstat you forgot to add seconds and timezone descriptions to the string conversion:

    var st = Date(start,"yyyy-MM-dd hh-mm-ss ZZZ","EST");

or Sign Up to reply!