Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

remove date time field

Good Morning friends.

I have a qvd file.

This field is as :

06/11/2013 08:10:28 p.m. -------->  06/11/2013

Remove date time field.

I generate the sentence "FLOOR"

DATE(FLOOR(ProductosDim),'DD-MMM-YY') AS KEY2,

¿that's right?

Date:06/11/2013

Hour:08:10:28 p.m

Please!!

thanks for the support!!

1 Solution

Accepted Solutions
maxgro
MVP
MVP

if you have a field with  "p.m."

first text box

=timestamp#(replace('06/11/2013 08:10:28 p.m.', '.', ''), 'DD/MM/YYYY hh:mm:ss tt')

second

=date(floor(timestamp(timestamp#(replace('06/11/2013 08:10:28 p.m.', '.', ''), 'DD/MM/YYYY hh:mm:ss tt'))))

third

=time(frac(timestamp(timestamp#(replace('06/11/2013 08:10:28 p.m.', '.', ''), 'DD/MM/YYYY hh:mm:ss tt'))))

replace 06/11/2013..... with your field

1.png

View solution in original post

3 Replies
JonnyPoole
Former Employee
Former Employee

You may need timestamp() in there to ensure its first read as a datetime ... and then floor() and then date() as follows:

Date(Floor(Timestamp(ProductosDim)) , 'DD-MMM-YY') as KEY2

maxgro
MVP
MVP

if you have a field with  "p.m."

first text box

=timestamp#(replace('06/11/2013 08:10:28 p.m.', '.', ''), 'DD/MM/YYYY hh:mm:ss tt')

second

=date(floor(timestamp(timestamp#(replace('06/11/2013 08:10:28 p.m.', '.', ''), 'DD/MM/YYYY hh:mm:ss tt'))))

third

=time(frac(timestamp(timestamp#(replace('06/11/2013 08:10:28 p.m.', '.', ''), 'DD/MM/YYYY hh:mm:ss tt'))))

replace 06/11/2013..... with your field

1.png

Anonymous
Not applicable
Author

Hi Carlos

DATE(FLOOR(ProductosDim),'DD/MM/YY')  as Date

DATE(FLOOR(ProductosDim),'hh:mm:ss tt')  as Time

Regards

Nitha