Home > front end >  Separate out the date and time from the column
Separate out the date and time from the column

Time:08-21

How do I separate date and time from this 2006-09-02T01:07:59.100 I’ve tried =int(A2) but it gives a value error. Please help.

CodePudding user response:

in the column for Date put this formula: =left(A2,10), for the time: =right(A2,12)

CodePudding user response:

Not sure what your purpose is. Display date and time separately or actually have two different values in different cells.

Excel does not play nice with "T" in the middle of the timestamp. You must remove "T" using a string function. Once you have done that your value will format nicely as a date. INT works for the date part, MOD works for time, format cells accordingly.

If display is the only requirement, put the same value in both cells and use cell formatting -- one for Date, one for Time.

  • Related