473,320 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

help with sql command--quickie hopefully

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?
Jun 8 '07 #1
4 885
cj,

You should post this in the SQL Server forum. I'll take a stab though.

Check out this article, specifically the CONVERT function.
http://sqljunkies.com/HowTo/6676BEAE...C7FD826E5.scuk

You can also just use the following syntax:
SELECT * FROM Table1
WHERE (dt '6/9/2007 01:43:21')

Hope this helps,
Steve

"cj" <cj@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>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?

Jun 9 '07 #2
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.

Jun 11 '07 #3
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.

cj wrote:
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?
Jun 12 '07 #4
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.

Jun 13 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Reckless | last post by:
I've got a file with this in it: The data I'd like extracted is within the quotes: Some string data I can read the file out and extract (using string positions) the data I'd like but it...
46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
0
by: Mike Chirico | last post by:
Hopefully this will help someone... Helpful Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Last Updated: Fri Apr 16 11:47:34 EDT 2004 The latest version of this...
2
by: MikeY | last post by:
Hopefully someone can help me out there. I"m running WinXP. Version of Visual Studio.NET is 2002. Studing Wrox C# Beginning. 1st. My problem is I am doing a new install, which when fine but...
2
by: Reza Solouki | last post by:
Hello, I never had to do anything with office tools programmatically till now(I guess there is first time for everything), so this might be a very silly and simple question for some of you. Any...
7
by: GAOZH | last post by:
Hi, I'm a new user of this webside and also a begginer of C++. Hopefully can get somehelp from you guys. :) Now I meet some problems, anybody can help me with the coding? Requirement: Write a...
46
by: Bruce W. Darby | last post by:
This will be my very first VB.Net application and it's pretty simple. But I've got a snag in my syntax somewhere. Was hoping that someone could point me in the right direction. The history: My...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
1
by: bobmct | last post by:
Again: struggling to convert old-style HTML to html using css. I am trying to create a rectangular box divided into approx three vertical sections. The top section contains an image I would like...
1
by: upstart | last post by:
Hi everyone…this is a tough one. You guys have been such a help before, hopefully you can point me in the right direction now. I have a Report I am working on that uses a stored procedure to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.