Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Remove time from a date 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
mjayachandran
Creator II
Creator II

Something like this might help u..


1. date(floor(timestamp#(ProductosDim,'M/D/YYYY h:mm:ss[.fff] TT')),'DD-MMM-YY') as date

2. time(frac (timestamp#(ProductosDim,'M/D/YYYY h:mm:ss[.fff] TT'))) as time



in your timestamp under time 08:10:28 p.m is a wrong format. We need to trim the '.' from P.M

so your expression becomes


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

View solution in original post

3 Replies
mjayachandran
Creator II
Creator II

Something like this might help u..


1. date(floor(timestamp#(ProductosDim,'M/D/YYYY h:mm:ss[.fff] TT')),'DD-MMM-YY') as date

2. time(frac (timestamp#(ProductosDim,'M/D/YYYY h:mm:ss[.fff] TT'))) as time



in your timestamp under time 08:10:28 p.m is a wrong format. We need to trim the '.' from P.M

so your expression becomes


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

anbu1984
Master III
Master III

Duplicate post

remove date time field

Not applicable
Author

Hi,

Try something like below

=Date( Makedate(mid(value,7,4),Mid(value,4,2),mid(value,1,2) ) , 'DD/MM/YYYY')

hope it helps

Kiru