help with sql command--quickie hopefully

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

I have a sql db table with a field of type DATETIME.

I want to do something like this:

select * from calls where timestamp > date("6/7/2007 7:00")

problem is date only works with a date with out the time. How can I get
the time in?
 
Hello CJ,
Thanks for Steve's reply.

I agree with Steve. I think it should work fine.
SELECT * FROM Table1 WHERE (dt > '6/9/2007 01:43:21')
Do you meet any further issue?

Hope this will help.
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Actually I figured this out with help from another forum. The SQL
command I needed apparently is specific to the Informix database I was
connecting to.

select * from calls where timestamp > '2007-06-07 19:48:58'

unlike sql server it doesn't take am/pm. It needs 24 hr format. I also
needs - instead of / and year first. That kind of formatting issue is
apparently all it took.

Thanks for the help.
 
Hello CJ
Thanks for your information.

I'm glad to hear you have resolved the issue.:)

Have a nice day,
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top