Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Gowtham174
New Contributor III

Date and time

Hi All,

Can you please help me to split the date and time into two difference column.

Input:

 

Local Start Time
2018-06-16T23:29:58.567

Output expected:

Date column:

16/06/2018


Time column:

23:29:58.567


Thanks,

Gowtham

1 Solution

Accepted Solutions
paola_valenti
New Contributor III

Re: Date and time

Data&TimeFormat.PNG

4 Replies
ChennaiahNallani
Contributor III

Re: Date and time

try like below.

Capture.PNG

paola_valenti
New Contributor III

Re: Date and time

Do you want "Date column" having only format as Date, or also numeric value without the hour part?

(and "Time column" containing only Time value, without data numeric value, or is only a format problem?)


If you want to separate numeric value of data+hour in 2 column you can use Floor and Frac function

Date column

Date(Floor(Date#('2018-06-16 23:29:58.567','YYYY-MM-DD hh:mm:ss.fff')))


Time Column

Time(Frac(Date#('2018-06-16 23:29:58.567','YYYY-MM-DD hh:mm:ss.fff')))


paola_valenti
New Contributor III

Re: Date and time

Data&TimeFormat.PNG

ahmar811
Contributor III

Re: Date and time

Hi,

Please find below expression for Date and Time

Date

Expression =Date(Date#(SubField('2018-06-16T23:29:58.567','T',1),'YYYY-MM-DD'),'DD/MM/YYYY')

Time

Expression=Time#(SubField('2018-06-16T23:29:58.567','T',2),'HH:MMSmiley FrustratedS.mm')

I hope this will help you

Regards

Ahmar