Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
isciberras
Creator
Creator

Date time stamp conversion: YYYY/MMDD HH:MM:SS

Hi Everyone,

I'm having trouble with converting a time stamp and can't seem to find the solution to this online.

I'm have a timestamp field in the format of: YYYY/MM/DD HH:MM:SS and I would like to separate the date and time fields from this. I tried several different types of syntax to get the required answer however nothing seems to work. So far the result of trying to convert the date timestamp is Qlikview not loading in the field.

Does anyone know how I can solve this issue?

Thanks,

Isaac

1 Solution

Accepted Solutions
Anonymous
Not applicable

The below should work if all you need to do is seperate them

=Date(Date#(Left(Date,10), 'YYYY/MM/DD'), 'DD/MM/YYYY')

=Time#(right(Date,8), 'HH:MM:SS')

View solution in original post

9 Replies
Anonymous
Not applicable

Do you have an example app / data you could share so we can see how it's been setup?

Colin-Albert

My guess is that you are not loading the timestamp values as a correctly formatted datetime so the data is stored in Qlik as a numeric value.

These posts should help.

Why don’t my dates work?

Get the Dates Right

Once you have the timestamp data in the correct format using time(frac([YourTimeStampField])) and date(floor([YourTimeStampField])) will separate the date and time components

PrashantSangle

Hi,

try with subfield(datefield,' ',1) as date

subfield(datefield,' ',2) as time


also check timestamp#(),timestamp(),date() and date#() in help menu


syntax and explanation is available in help


Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable

The below should work if all you need to do is seperate them

=Date(Date#(Left(Date,10), 'YYYY/MM/DD'), 'DD/MM/YYYY')

=Time#(right(Date,8), 'HH:MM:SS')

sergio0592
Specialist III
Specialist III

Try with:

Date_filed=Date#(left(Timestamp_field,10),'YYYYMMDD')

Time_field=Time#(right(Timestamp_field ,8),'HH:MM:SS')

After, you can format them with Date and Time function.

isciberras
Creator
Creator
Author

Tried everything and took ages, but this worked perfectly thank you so much

isciberras
Creator
Creator
Author

Thank you for your help

isciberras
Creator
Creator
Author

Thank you for your help

isciberras
Creator
Creator
Author

Thank you for your help