SQL Date Query |
Post Reply
|
| Author | |
Desperado
Senior Member
Joined: 27 January 2005 Location: United States Status: Offline Points: 1143 |
Post Options
Thanks(0)
Quote Reply
Topic: SQL Date QueryPosted: 05 September 2007 at 11:06am |
|
Anyone know the SQL Syntax for Monday through Friday but NOT Saturday and Sunday?
|
|
|
The Desperado
Dan Seligmann. Work: http://www.mags.net Personal: http://www.desperado.com |
|
![]() |
|
Derk
Groupie
Joined: 26 January 2005 Location: United States Status: Offline Points: 39 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 September 2007 at 2:11pm |
|
this example is probably close to what you want:
http://www.plus2net.com/sql_tutorial/date-dayofweek.php |
|
![]() |
|
atifghaffar
Senior Member
Joined: 31 May 2006 Location: Switzerland Status: Offline Points: 104 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 September 2007 at 4:22pm |
|
Desperado,
For Mysql it would be dayofweek. Sunday=1, ..... Saturday=7; Example: Show number of quarantine by dayof week select dayofweek(msgdate) as d, count(*) from tblquarantine group by d; Example: show number of quarantine by dayof week but not saturday and sunday. select dayofweek(msgdate) as d, count(*) from tblquarantine group by d having d>1 and d<7; |
|
|
best regards
Atif |
|
![]() |
|
Desperado
Senior Member
Joined: 27 January 2005 Location: United States Status: Offline Points: 1143 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 September 2007 at 5:04pm |
|
Thanks to both ... I will give it a shot!
|
|
|
The Desperado
Dan Seligmann. Work: http://www.mags.net Personal: http://www.desperado.com |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.219 seconds.


Topic Options
Post Options
Thanks(0)


