Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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?

khan_imran
Creator II
Creator II
Author

Thanks Stefan.. It worked.