Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Cannot convert column value to custom column and set type to time

Hi all,

 

 I have what appears to be unix epoch time in ms (I think). I tried creating a custom column with 

#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [UnixTime]/1000)

however that does not work and results in Error values

 

If I use this instead

#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, 1410907851)

 

I do get results but are the same date and time in 2014. What am I missing here?

 

 

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

    #duration(0, 0, 0, 1410907851) means 1410907851 seconds,  when you add 1410907851 seconds to the date 1970/1/1, it will get 2014 by default.

     

    Please show me which result do you want, i can test and find the solution for you.

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Maggie  v-juanli-msft  I think this format is actually in epoch ms time but for some reason this resulted in an error when I applied it.