Forum Discussion

ericOnline's avatar
ericOnline
Post Patron
7 years ago
Solved

Control STRING to DATE/TIME Conversion?

Hello, 

 

When changing a STRING type column to a DATE/TIME type colum using:

 

#"Changed Type" = Table.TransformColumnTypes(
    #"Reordered Columns1",
        {
            {"weatherTime", type datetime}
        }
),

... some kind of "auto-magic" is applied to the time that I DO NOT WANT. In this case, the auto-magic is changing the string from

2017-11-01T12:00:00.000Z

to 

11/1/2017 5:00:00 AM

 

which is a -7hr translation for some reason.

 

How do I control this conversion?


Thank you

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi ericOnline,

     

    It may be because of your computer timezone. 

     

    Regards,

    Ravi

  • Hi Anonymous, you're right. I just realized that the original TimeStamp (STRING) is 12:00 PM not 12:00 AM (which would have been 00:00). 

     

    Thank you for your insights.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ericOnline,

     

    It may be because of your computer timezone. 

     

    Regards,

    Ravi

    • ericOnline's avatar
      ericOnline
      Post Patron

      Hi Anonymous, you're right. I just realized that the original TimeStamp (STRING) is 12:00 PM not 12:00 AM (which would have been 00:00). 

       

      Thank you for your insights.