SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Dateandtime search


Dateandtime search

Author
Message
amdavis
amdavis
SSC Veteran
SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)

Group: General Forum Members
Points: 233 Visits: 32
<-- new at sql

I'm trying to run a query on time but my date and time are in the same field.

Example I'm trying to get the rows between 6/22/2008 12:00:54 AM to 6/23/2008 12:11:57 AM

Unfortunantly I don't have the luxury of splitting up the date and time.

Select * from log where dateandtime ?????????
noeld
noeld
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38916 Visits: 2051
amdavis (6/23/2008)
<-- new at sql

I'm trying to run a query on time but my date and time are in the same field.

Example I'm trying to get the rows between 6/22/2008 12:00:54 AM to 6/23/2008 12:11:57 AM

Unfortunantly I don't have the luxury of splitting up the date and time.

Select * from log where dateandtime ?????????


what is the problem with:

Select * from log where dateandtimecolumn between '6/22/2008 12:00:54 AM' and '6/23/2008 12:11:57 AM'


* Noel
amdavis
amdavis
SSC Veteran
SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)

Group: General Forum Members
Points: 233 Visits: 32
Thanks! I need to learn more keywords BigGrin
http://www.1keydata.com/sql/sql-syntax.html
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search