T O P I C R E V I E W |
yaarash |
Posted - 08/25/2022 : 02:34:33 AM I have data with a date and time column together and I want to separate them to a time column and date column separately. How can I do that?
Ya'ara |
3 L A T E S T R E P L I E S (Newest First) |
snowli |
Posted - 08/25/2022 : 09:54:08 AM Could you show how column A looks like? If it's regular date and time display, set the column to Time should work.
Also if it's in regular date and time display, u can use frac(date(A)). Column B is set as Time afterwards.
date(A) -- convert the string in column A into date (julian date) frac() -- return the decimal part
If the display is not typical date and time, u will need to specify the display syntax as 2nd argument of date() function E.g. frac(date(A, "yyyy/MM/dd HH:mm:ss"))
See the help document https://www.originlab.com/doc/LabTalk/ref/Date-func
Thanks, Snow |
yaarash |
Posted - 08/25/2022 : 05:30:49 AM Hi! I don't need the date info, only the time. the original properties of the column are "Text&Numeric" so when I try to change to "Time" it gives me an error massage: "the specified format does not match the data in the column."
Ya'ara |
Cecilia_syy |
Posted - 08/25/2022 : 04:32:50 AM Hi I wonder in the new time column, do you still want the date info? If you want to keep value, then you can change display format in column Properties dialog. If you do not want date info in time column, then you can add new Date column, then set f(x) to round(A), set display to date in properties dialog. Add new Time column, then set f(x) to A-round(A), set display to time in properties dialog. In the f(x), I assume the original data+time column is column A.
Thanks Cecilia |
|
|