Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Conversion

Looking for the magic bullet to convert dates currently coming in as text in the following format:

Tuesday, May 11, 2010 08:32:12 AM

I have several dates in the above format that need to be used in calculations to measure response time between two fields e.g. [response date] - [submit date]

Short of using string functions (e.g. subfield, etc..) to break these dates up into usable parts is there a quicker way that someone has used in the past? Is there way to change the default date format in the script to deal with this?

Thanks.

/emb

1 Reply
Not applicable
Author

Hi Bglbi,

Tuesday, May 11, 2010 08:32:12 AM this format of date and time is known as time stamp in qlikview as you know. You can separate date and time from this format. To extract the date from this timestamp, just use the function "date(field,format)" and you must specify the format here because this makes qlikview understand that the date is in the format you have specified. Next to extract time from this use the time() function. I hope this solves your issue. you can do this in the script itself while loading the data. Now that the date and time are separate you can do any kind of operations with the dates. hope this helps you...For more information on this go to the reference manual and search for timestamp and you will understant how to work with the timestamps.....

Thanks Joseph....