locked
Formatting UTC time stamps RRS feed

  • Question

  • I'm getting a bunch of time stamps in UTC time that look like the below. I'm looking to get them to show in the format of something like 4/19/2015 4:10:03 AM.

    2017-12-12T23:53:39.0970781+00:00
    2017-12-13T18:23:35.6223402+00:00
    2017-12-13T19:29:49.1220332+00:00
    2017-12-13T19:40:49.4318988+00:00
    2017-12-13T19:41:34.4198522+00:00

    I've tried a few sample scripts I found online to convert from UTC to PST which is my goal, but they are not working. 

    There must be a proper way to do this, but I can't figure it out.  Thanks in advance!

    Thursday, December 14, 2017 1:07 AM

Answers

  • Simple:

    [datetime]'2017-12-12T23:53:39.0970781+00:00'

    The DateTime type is designed to understand nearly all date time formatted strings.


    \_(ツ)_/

    Thursday, December 14, 2017 1:28 AM