I have a UTC timestamp. I want to convert it into YYYY/MM/DD format in R.
For example, 1318394558766. I tried format command unsuccessfully.
Any help is appreciated.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
as.POSIXctoras.POSIXlt. However you have to know the origin date from which your number of milliseconds started.Then you can use
formatto get the desired YYYY/MM/DD: