Hi All,
How do I get difference two timestamps ?
I want to know if two timestamps are within a minute , how do acheive this?
Lets us say time1 is 15:41
time2 is 20:40
without doing substrings..is there a way to use functions.
Advance Thanks to you all.
difference in timestamps..
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm
Thank you all for your responses.
But my input times are from file (ie; is varchar) and as below
Time 1 is 8/4/2010 12:40
Time 2 is 8/4/2010 12:41
I see many functions are available but
could someone please suggest me with some data/time functions with exact format as help is not very clear for me.
Thanks for your help.
But my input times are from file (ie; is varchar) and as below
Time 1 is 8/4/2010 12:40
Time 2 is 8/4/2010 12:41
I see many functions are available but
could someone please suggest me with some data/time functions with exact format as help is not very clear for me.
Thanks for your help.
Add zero to month and day if your input dont have
Code: Select all
SecondsSinceFromTimestamp(TimeStampToString(StringToTimeStamp('08/04/2010 12:41':':00','%dd/%mm/%yyyy %hh:%nn:%ss'),'%yyyy-%mm-%dd %hh:%nn:%ss'),TimeStampToString(StringToTimeStamp('08/04/2010 12:40':':00','%dd/%mm/%yyyy %hh:%nn:%ss'),'%yyyy-%mm-%dd %hh:%nn:%ss'))
You are the creator of your destiny - Swami Vivekananda