Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help: how to separate date and time

Hello Qlivers,

     if I want to serarate date and time from a colume contained both date and time together. how do i do it??

thank you~~

This is a sample of the date colume.

qlikview.PNG

none of the codes were actually not working,

but i actually figured out how to do it, Anyways guys, for future reference, here is what i have::

Date(date#(date(Floor(departure), 'DD/MM/YYYY'), 'MM/DD/YYYY'), 'MM/DD/YYYY') as OutputDate,

Timestamp(arrive-Floor(departure), 'hh:mm') as OutputTime;

5 Replies
Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Give that there's no visual of teh Date & Time format from your data.

Try Date(Subfield(xxxx,1) as date

      Time (Subfield(xxxx) as Time

It that didn't work then upload sample data.

Regards,

Gabriel

Not applicable
Author

Hi Gabriel, here is what my date look like.

qlikview.PNG

m_woolf
Master II
Master II

If your field is named MyField:

date(floor(MyField) as MyDate,

timestamp(MyField-floor(MyField) as MyTime,

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Try this code using LIST BOX

Right click anywhere in the sheet then New Sheet Object -> List Box -> Field pane select Expression -> then enter

=date(SubField(DateTime,' ',1)) click ok.

This will give you just the Date

Right click anywhere in the sheet then New Sheet Object -> List Box -> Field pane select Expression -> then enter

=time(SubField(DateTime,' ',2)) click ok.

This gives you the time part.

This works for me so it should work.

Regards,

Gabriel

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

You Can create fileds like below

Date(Floor(DateTimeField)) As DateField

Time(Frac(DateTimeField)) AS TimeField

Hope it helps

Celambarasan