Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
andy_smith2005
Partner - Contributor III
Partner - Contributor III

Timestamp# joining two fields to create a timestamp

I have a series of text files delimited by white space something like this:

16/01/15 20:45:56

16/01/15 21:50:13

I want to join the two fields together to create a timestamp field from which I can build an incremental load strategy/script. I have tried various things using date,num,timestamp,timestamp#,makedate#floor and the most I achieve is either a string of data which qlikview will only recognise as a string and not a timestamp, or a number which Qlikview doesnt recognise as a date.

Anyone got any ideas??

10 Replies
Not applicable

Hi,

this should work. Try:

timestamp#(Field1&' '&Field2,'DD/MM/YY hh:mm:ss')

Hope this helps.

Kind regards,

Nuno

Colin-Albert

Try

Timestamp(Timestamp#(your_field_name, 'DD/MM/YY hh:mm:ss')) as timestamp_field_name

Anonymous
Not applicable

It depends what format your fields are, may be something like this if they are true QlikView timestamps, then maybe something like this :

     text(now()) & '|' & text(now()-0.5)

You'll need to replace now() and now()-0.5 with your filed names.

andy_smith2005
Partner - Contributor III
Partner - Contributor III
Author

Nuno - cheers matey that was just what I needed - I am sure that your solution was one of the combinations that I used previously, but I think where I was going wrong was in the format area of the expression

many thanks

andy_smith2005
Partner - Contributor III
Partner - Contributor III
Author

Bill - no these are just plain text fields - interested in understanding the use of the now() function though - why have you used this??

andy_smith2005
Partner - Contributor III
Partner - Contributor III
Author

thanks Colin but that won't join the two fields together as far as I can see , though I could just be a doughnut!!

Anonymous
Not applicable

now() simply returns the timestamp of now.  I find it useful for testing expressions using date & time functions.

maxgro
MVP
MVP

read rhis

QlikView Date fields

and/or see image for expression to convert your string (I used 16/01/15 20:45:56)

1.jpg

Not applicable

If you want to create a Time stamp out of to fields i.e. Date and Time... Simply add them...

for example: Load Datefield+Timefield as Timestamp

Hope it helps.

Nitesh