View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Relative time in SQL

the basic approach would be

" . . . where StartTime = '" & Format(Data-1,"mm/dd/yyyy") & " 07:00:00'
and StartTime <= '" & Format(date,"mm/dd/yyyy") & " 07:00:00'"

You would have to insure the format is consistent with what you database
accepts.

--
Regards,
Tom Ogilvy

"Igor Sudnik" wrote in message
...
Hi, Guys. Could any one tell me how to write relative time expression in
query. I need something like: WHERE Start time is between "Today
07:00:00 -24H and Today 07:00:00". Any help is greatly appreciated.