Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have date field called 'receivedate' in my table with time stamp like 10/02/2016 12:10:45 am..........
i want to subtract from present date&time to my datefiled. i tried by using now function.
now()-receivedate but it is not giving correct output.
tried something like this
but not sure about the result .i got year as 1900
Timestamp(
Timestamp#( '10/02/2016 10:45:10')
-
Timestamp(Timestamp#(Now(),'D/M/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss ')
,'DD/MM/YYYY hh:mm:ss ')
When you find the difference between your date, it should give the result as number. Not in Timestamp format.
LOAD RecievedDate,
Now()-RecievedDate as Diff
From YourSource;
Hi RGV,
Your expression should be changed slightly as below.
=Timestamp(
Timestamp(Now(),'DD/MM/YYYY hh:mm:ss')
-
Timestamp(Timestamp#('10/02/2016 10:45:10','DD/MM/YYYY hh:mm:ss'))
,'DD/MM/YY hh:mm:ss ')
Which Gives you result as 24/02/00 08:04:31 :::
Which to be interpreted as
24 days
2 Months
00 Years
8 Hrs
4 Min
31 sec
as the difference between DATE defined & NOW();
Hope it helpful.
Regards,
Ajay Kumar
+65-9390 2241
rgv rand wrote:
tried something like this
but not sure about the result .i got year as 1900
Timestamp(
Timestamp#( '10/02/2016 10:45:10')
-
Timestamp(Timestamp#(Now(),'D/M/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss ')
,'DD/MM/YYYY hh:mm:ss ')
Hi AjayKumar,
Thanks for the changes in the expression .