|
| |
|
|
webgyrl
Posts: 52 Joined: 2/9/2009 Status: offline
|
SQL TIME QUERY HELP - 4/26/2009 18:07:11
i have a databse which saves the time when you enter a record i would like to know if anyone knows a query i could write that would subtract the time the record was posted from the current time and return the results like saying how long ago the record was posted eg. 1 hr
|
|
|
|
webgyrl
Posts: 52 Joined: 2/9/2009 Status: offline
|
RE: SQL TIME QUERY HELP - 4/29/2009 12:12:39
thanks!
|
|
|
|
webgyrl
Posts: 52 Joined: 2/9/2009 Status: offline
|
RE: SQL TIME QUERY HELP - 4/29/2009 12:58:40
hey thanks for responding...i got the script but unfortunately i am not sure how to go about it as i need it to be able to say minutes when it is less than an hour and hours once it has passed...is it possible for yyour to write me a sample that i may copy..thanks!!!!!!!!!!!!
|
|
|
|
ddonaldson
Posts: 6 Joined: 3/20/2009 Status: offline
|
RE: SQL TIME QUERY HELP - 5/7/2009 12:52:38
This should work: Time Since: IIf(DateDiff("n",[Timestamp],Now())<60,DateDiff("n",[Timestamp],Now()) & " Minutes",DateDiff("h",[Timestamp],Now()) & " Hours") [Timestamp] = your timestamp field in the database If the number of minutes that have been passed is less than 60 then display the minutes, otherwise display the hours.
< Message edited by ddonaldson -- 5/7/2009 13:15:16 >
|
|
|
|
webgyrl
Posts: 52 Joined: 2/9/2009 Status: offline
|
RE: SQL TIME QUERY HELP - 5/18/2009 15:47:36
thanks a bunch!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|