help with sql command--quickie hopefully

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?
 
W

WenYuan Wang [MSFT]

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.
 
C

cj

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.
 
W

WenYuan Wang [MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top