1 Reply Latest reply: Feb 21, 2014 2:21 AM by Gysbert Wassenaar RSS

    milliseconds to PST

    Praveena Velagapudi



      I could able to convert milliseconds to UTC/GMT  date and time using

      Date((MakeDate(1970, 1, 1) +round(millisecondtime/1000)/(60*60*24))) as [Date-UTC],

            time(millisecondtime/(1000*60*60*24),'hh:mm:ss')as [Time-UTC] 


      but I need to show in PST ;only to show lagging in 8 hours from UTC; I tried to convert UTC into PST by 


                               ConvertToLocalTime([Time-UTC],'UTC-08:00')  gives me correct time but not date... can some one help me with this?


      for example



      1389400952247 -----> Jan 10, 2014 16:42:32 should be in PST

        • Re: milliseconds to PST
          Gysbert Wassenaar

          Works for me:



          Date((MakeDate(1970, 1, 1) +round(1389400952247/1000)/(60*60*24)))



          returns 10/01/2014 16:42:32 here



          Date((MakeDate(1970, 1, 1) +round(1389400952247/1000)/(60*60*24)))



          returns 11/01/2014 00:42:32


          And that's 8 hours later than 16:42:32 and means it's just a bit past midnight and thus the next day.