Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
khan_imran
Creator II
Creator II

Date field format correction

Hello All,

I am getting below information in Date which from system. Now, I want to convert it into MM/DD/YYY hh:mm:ss format.

Fri Jan  1 00:00:56 2016.262 (Day,Month, Date, hh:mm:ss, Year, ms)

Kindly assist me on this.

Regards,

Imran Khan

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this

=Timestamp(Timestamp#(Subfield(Mid('Fri Jan  1 00:00:56 2016.262',5),'.',1),'MMM  D hh:mm:ss YYYY'),'MM/DD/YYYY hh:mm:ss')

[there are different approaches possible to interpret your input value, but basically, use interpretation timestamp#() function on the relevant part of your input value and format using timestamp()

For example, if you want to keep the milliseconds in the numeric representation:

=Timestamp(Timestamp#(Mid('Fri Jan  1 00:00:56 2016.262',5),'MMM  D hh:mm:ss YYYY.fff'),'MM/DD/YYYY hh:mm:ss')

]

Get the Dates Right

Why don’t my dates work?

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like this

=Timestamp(Timestamp#(Subfield(Mid('Fri Jan  1 00:00:56 2016.262',5),'.',1),'MMM  D hh:mm:ss YYYY'),'MM/DD/YYYY hh:mm:ss')

[there are different approaches possible to interpret your input value, but basically, use interpretation timestamp#() function on the relevant part of your input value and format using timestamp()

For example, if you want to keep the milliseconds in the numeric representation:

=Timestamp(Timestamp#(Mid('Fri Jan  1 00:00:56 2016.262',5),'MMM  D hh:mm:ss YYYY.fff'),'MM/DD/YYYY hh:mm:ss')

]

Get the Dates Right

Why don’t my dates work?

View solution in original post

khan_imran
Creator II
Creator II
Author

Thanks Stefan.. It worked.