Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tomcatxx
Creator
Creator

1 field in 2 columns Load?

Hello, there.

I have a question.

One filed of my table.csv is called  Time.  It looks like so.

Time
12/3/2015 01:21
2/6/2014 00:23
3/11/2015 00:18
...
...
...

I want to load 'Time' in two columns like this.

datetime
12/03/201501:21
02/06/201400:23
03/11/201500:18
......
......

..

...

I dont know how to make '12/3/2015' to '12/03/2015'. I cant use Left() to select date, because the Byte length of date in my csv is not same.

1 Reply
vishsaggi
Champion III
Champion III

may be one option :

DateField:
LOAD *, Timestamp(Timestamp#(DateTimeField, 'MM/DD/YYYY hh:mm'), 'hh:mm') AS TimeStamp,
Date(Date#(DateTimeField, 'MM/DD/YYYY hh:mm'), 'MM/DD/YYYY') AS DateStamp INLINE [
DateTimeField
12/3/2015 01:21
2/6/2014 00:23
3/11/2015 00:18
]
;