Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How to convert number into date-time format in excel ( i have equivalent solution achieved in R)

$
0
0

enter image description here

Referring to the above screenshot, i'm trying to crawl data from Singapore Stock Exchange, which the web content is loaded dynamically from an API call returning json, example here

I'm having some problem with the dates, which is given as a number by the json. For example, 1575491760000 is supposed to be 2019-12-04 20:36:00GMT.

After some trial and error, i've figured solution using R:

as.POSIXct(1575491760000/1000, origin="1970-01-01", tz = 'GMT')  
# not sure why need to divide the number by 1000 here but i guess this is the way to make it work

and the above code does return "2019-12-04 20:36:00 GMT" in R.

However, my question is there a solution to the above conversion in Excel? I've tried a few different ways but none of them can deal with such long data scenario (date + time format). Appreciated if anyone can provide a specific solution!


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>