Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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??
Hi,
this should work. Try:
timestamp#(Field1&' '&Field2,'DD/MM/YY hh:mm:ss')
Hope this helps.
Kind regards,
Nuno
Try
Timestamp(Timestamp#(your_field_name, 'DD/MM/YY hh:mm:ss')) as timestamp_field_name
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.
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
Bill - no these are just plain text fields - interested in understanding the use of the now() function though - why have you used this??
thanks Colin but that won't join the two fields together as far as I can see , though I could just be a doughnut!!
now() simply returns the timestamp of now. I find it useful for testing expressions using date & time functions.
read rhis
and/or see image for expression to convert your string (I used 16/01/15 20:45:56)
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