Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello that's my first time here! I have a sql column in seconds (10 characters) and i need to add (dateadd in sql), the seconds to one date ex: (2/31/1969 6:00 pm) to extract the spend time since that date ex: dateadd([second],columnname,'12/31/1969 6:00 pm') ¿it's there a way to do this in QlikView? Regards!
Use the functions: ConvertToLocalTime(timestamp(25569+YOURFIELD/24/60/60),'GMT-06:00') where the 'GMT-06:00' it's yout UTC zone enjoy!
Divide the number of seconds by 86400 and add that to a date: MyNewDateTime = MyDateTime + Seconds/86400
Thanks! I have a question i have my start datetime field with the format "am/pm" ¿how it works? MyNewDateTime = 2/31/1969 6:00 pm + MyfieldInSeconds/86400 ??? Regards!
Thanks! I have a question i have my start datetime field with the format "am/pm" ¿how it works? MyNewDateTime = 2/31/1969 6:00 pm + MyfieldInSeconds/86400 ??? Regards!
Use Date# function to format it to the date format that you going to provide as input.
Qlikview itself process 1 days as integer 1.
You can check it by Num(Today()).
If it's a string you first need to make it a date. Something like this I think:
MyNewDateTime = date#('2/31/1969 6:00 pm','D/MM/YYYY hh:mm TT') + MyfieldInSeconds/8640
Use the functions: ConvertToLocalTime(timestamp(25569+YOURFIELD/24/60/60),'GMT-06:00') where the 'GMT-06:00' it's yout UTC zone enjoy!