Date calculation
Posted: Sat Nov 10, 2007 8:18 am
Hi
I have two timestamps in the format yyyy-mm-dd hh24:mi:ss.
I want to find the exact difference (sec level). I am doing below code, but is only giving me the difference in number of days not up to the HH:MM:SS level. Can someone help me to modify the code?
code
Iconv(Field(date1," ",1),"D-YMD[4,2,2]") - Iconv(Field(date2," ",1),"D-YMD[4,2,2]")
date1 - date2
example:
2007-11-10 00:05:44 - 2007-10-26 09:50:42
results i am getting : 15 (days)
Thanks
I have two timestamps in the format yyyy-mm-dd hh24:mi:ss.
I want to find the exact difference (sec level). I am doing below code, but is only giving me the difference in number of days not up to the HH:MM:SS level. Can someone help me to modify the code?
code
Iconv(Field(date1," ",1),"D-YMD[4,2,2]") - Iconv(Field(date2," ",1),"D-YMD[4,2,2]")
date1 - date2
example:
2007-11-10 00:05:44 - 2007-10-26 09:50:42
results i am getting : 15 (days)
Thanks