Qlik Community

New to Qlik Community

Discussion board for questions on how to use Qlik Community and its features.

Announcements
This forum is for questions and information about how to use the Qlik Community.
Please do not post product related questions here.
Select the correct forum from: Qlik Product Forums
cdominguez
New Contributor III

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
MVP
MVP

Re: remove date time field

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

3 Replies
Employee
Employee

Re: remove date time field

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

MVP
MVP

Re: remove date time field

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

neetha_p
Honored Contributor

Re: remove date time field

Hi Carlos

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

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

Regards

Nitha

Community Browser