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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
David_K
Creator
Creator

Create DATE/TIME Stamp

Hi all,

I have a data table that provides date and times as separate fields.  Initially the date field was a string, but I have converted this to a date formatted field.

Can anyone advise how I can join the 2 fields together to get a single date/time stamp from which I can then hopefully work out NetWorkDays and time taken between 2 entries.

Thanks in Advance.

Labels (4)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

Great !  Please close this thread by accepting solution .so that it will helpful to others when they search on similar issue.

View solution in original post

6 Replies
Or
MVP
MVP

You can concatenate your strings and use timestamp#(YourField,'FieldFormat')

Chanty4u
MVP
MVP

try this

   =Timestamp(Date#('Datefield','DD-MM-YYYY') + Time#('Timestampfield','hh:mm:ss'), 'DD-MM-YYYY hh:mm:ss')

David_K
Creator
Creator
Author

Hi Chanty4u,

I have tried your script above in the 'Data load editor' but just get a blank result once I load the script.

 

David_K_0-1648652119363.png

Any ideas where I have gone wrong?

Thanks,

David_K

Chanty4u
MVP
MVP

have you given your correct date format  like below?  

=Timestamp(Date#('Datefield','YYYY-MM-DD') + Time#('Timestampfield','hh:mm:ss'), 'DD-MM-YYYY hh:mm:ss')

David_K
Creator
Creator
Author

Hi Chanty4u,

Thanks for the additional guidance - it works OK now 

Chanty4u
MVP
MVP

Great !  Please close this thread by accepting solution .so that it will helpful to others when they search on similar issue.