Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a date with timestamp, where i need to show that -3 hours from actual date.
I have tried with different date functions but we can able to do.
Ex: 07/10/2016 01:00:00 000
Output should be 07/09/2016 22:00:00 000;
Can you please give any suggestions?
I think first thing to check here is if your timestamps are read correctly by QlikView. If it has doing as simple as this could work:
TimeStamp(TimeStampField + MakeTime(3)) as NewField
or this in front end
=TimeStamp(TimeStampField + MakeTime(3))
But if timestamps are not interpreted correctly, try to fix that issue before you do this manipulation using TimeStamp#() or Date#() function
try this
= date ( date#(' 07/10/2016 01:00:00 000' , 'DD/MM/YYYY hh:mm:ss') , 'DD/MM/YYYY hh:mm:ss')
& chr(10) &
date ( date ( date#(' 07/10/2016 01:00:00 000' , 'DD/MM/YYYY hh:mm:ss') , 'DD/MM/YYYY hh:mm:ss') +(-180/24/60) , 'DD/MM/YYYY hh:mm:ss')
edited
or else try below
Timestamp#(YourFieldName, 'YYYY-MM-DD hh:mm:ss') AS OldTime,
Timestamp(YourFieldName+Time#(-3,'hh')) as NewTime
Hi!
This seems to work:
Timestamp([Date_Time]-(3/24)) as Timestamp_substracted
Hi,
I am receiving blank information when i copied this in text box.
Still not getting result ![]()
Hi Sridar,
Try:
=Timestamp(Timestamp#('07/10/2016 01:00:00 000','MM/DD/YYYY hh:mm:ss fff') - 1/8,'MM/DD/YYYY hh:mm:ss fff')
Cheers
Andrew
=date ( date#('07/10/2016 01:00:00' , 'MM/DD/YYYY hh:mm:ss') , 'MM/DD/YYYY hh:mm:ss')
& chr(10) &
date ( date ( date#('07/10/2016 01:00:00' , 'MM/DD/YYYY hh:mm:ss') , 'MM/DD/YYYY hh:mm:ss') + (-180/24/60) , 'MM/DD/YYYY hh:mm:ss')
I think first thing to check here is if your timestamps are read correctly by QlikView. If it has doing as simple as this could work:
TimeStamp(TimeStampField + MakeTime(3)) as NewField
or this in front end
=TimeStamp(TimeStampField + MakeTime(3))
But if timestamps are not interpreted correctly, try to fix that issue before you do this manipulation using TimeStamp#() or Date#() function
Thanks Sunny.