Convert timestamp to DateTime in excel - excel

Is there any way in Excel to convert the timestamp in the format
{"_seconds":1570448585,"_nanoseconds":834000000}
to readable format (Human-friendly)?
1-Oct-2018 12:00 PM

The seconds look like a UNIX timestamp.
UNIX time started counting seconds 1970.
To convert it you need to start with the date 1970-01-01 and add the days as a float.
=DATE(1970,1,1) + A1/60/60/24

I found the solution - There is a feature called "Text to column"

Related

Converting Dates - What format is 20130606T083000.093660900? [duplicate]

This question already has an answer here:
How to convert string format date yyyymmddThhmmss.sss to date in Bash?
(1 answer)
Closed 6 months ago.
Bit of an issue with date formatting:
Looking to format this date format " 20130606T083000.093660900 "
2013 06 06 T 08 30 00. 093660900
YYYY MM DD T HH MM SS NANOSECS
Formatting this into Epoch (which I believe is the second time given below without decimals) time would be great, I don't have much experience working with date time and changing them.
My goal is to realistically subtract
20130606T083000.093660900 FROM 1370507400093660900
Any help with even telling me what format the first date is, as it is apparently NOT ISO 8601, thanks!
You can use sed to convert the input to something GNU date can parse, then use GNU date to convert it to the format of the other date. Then compare:
din='20130606T083000.093660900'
dcmp='1370507400093660900'
dstr=$(sed 's/\(..\)\(..\)T\(..\)\(..\)/-\1-\2T\3:\4:/' <<<"$din")
timestamp=$(TZ=UTC0 date +%s%N --date="$dstr")
diff=$(( dcmp - timestamp ))
# diff is now: 0
I have forced timezone to avoid localisation concerns.

Convert UTC Time/Date to Local Time/Date keeping milliseconds

2021-01-14T17:00:23.87Z
I am trying to convert the info above to date and time and keep milliseconds. Does anyone have a formula for this?
I give up trying to find a perfect match on this site:
=--SUBSTITUTE(LEFT(A1,LEN(A1)-1),"T"," ")
Then format the cell: yyyy-mm-dd hh:mm:ss.00

I have to convert utc time to ist in excel

I have to convert utc time to ist time in my excel the the time format is 10:00:00 utc this has to converted in IST timing.
Please suggested
There are no inbuilt functions that identify/convert the timezones. We can extend the capabilities of Excel Time() function to solve this use case.
=A1+Time(5,30,0)
For IST, you will have to add 5 hours and 30 minutes. Similarly, you can convert to any timezone by adding/subtracting the time difference.
The three inputs given to the Time() are hours,minutes and seconds.
This function returns the timestamp in a serial number format. Excel will interpret this number and show the timestamp in a readable format.

Casting unix time to date in Presto

I have timestamps stored in time since epoch (ms) and I would like to query and display results using a date formatted like 'yyyy-mm-dd'.
cast(from_unixtime(unixtime) as date)
See https://prestodb.io/docs/current/functions/datetime.html for more datetime functions.
as you mentioned epoc(ms)
division by 1000 would convert it to seconds.
date(from_unixtime(min(ts)/1000))
This helped me my epoch time is saved as BigInt and stored to be accurate to milliseconds.
Use following to get the answer in YYYY-MM-DD format
format_datetime(from_unixtime(unixtime), 'Y-MM-dd')
Example:
format_datetime(from_unixtime(1664582792), 'Y-MM-dd')
Output --> 2022-10-01
Using cast as date as follows
cast(from_unixtime(1664582792) as date)
will give output as
2022-10-01 00:00:00.000

How to change the timestamp format shown when undo/redo in vim?

When undo/redo in vim, the status shows like:
1 change; before #33 12:03:05
The time format is HH:MM:SS; but referring to this, seems there are four possible formats:
N seconds ago
HH:MM:SS (hour, minute, seconds)
MM/DD HH:MM:SS (idem, with month and day)
YYYY/MM/DD HH:MM:SS (idem, with year)
Can I change this timestamp format shown? Thank you!
It seems not likely.
You can probably use some plugin (Gundo or undotree to name just two) to get desired output.

Resources