Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

My Date# function is not working properly

Hi All,

Iam trying to use the Date# function in my script but ut's not working.

Original Date:- 08/23/2013 16:45:10

Expected Output:- 23/08/2013 16:45

I have used function date#('Origanal_Date', 'DD/MM/YYYY HH:MM')

but it returing the same data  i.e  08/23/2013 16:45:10.

Can anyone help me on this.

Thanks,

D J

1 Solution

Accepted Solutions
Not applicable
Author

Timestamp((Date(SubField(Original_Date,' ',1),'MM/DD/YYYY')+Time(SubField(Original_Date,' ',2),'h:mm')),'MM/DD/YYYY hh:mm')

The above is working.

Thanks all for your help and valuable suggestion.

Thanks,

D J

View solution in original post

5 Replies
datanibbler
Champion
Champion

Hi dhiraj,

try timestamp fct.

HTH

Best regards,

DataNibbler

Not applicable
Author

Try...
date(date#(Original_Date, 'MM/DD/YYYY HH:MM:SS'),'DD/MM/YYYY HH:MM')

Anonymous
Not applicable
Author

Small correction

date(date#(Original_Date, 'MM/DD/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm')

It is case-sensitive.  MM is for months, mm is for minutes.

Regards,

Michael


maxgro
MVP
MVP

=date(date#('08/23/2013 16:45:10', 'MM/DD/YYYY hh:mm:ss'), 'MM/DD/YYYY hh:mm')

Not applicable
Author

Timestamp((Date(SubField(Original_Date,' ',1),'MM/DD/YYYY')+Time(SubField(Original_Date,' ',2),'h:mm')),'MM/DD/YYYY hh:mm')

The above is working.

Thanks all for your help and valuable suggestion.

Thanks,

D J