Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
| Search | Today's Posts | Mark Forums Read
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 13th, 2005, 08:13 AM
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default Choose all by date?

SELECT * FROM ORMag where date = 2005 ORDER BY IssueNumber DESC

Can someone correct this statement for me? I can't seem to make it work , also what format should the date column be in m/d/yyyy ?

Thanks

-----------------------------------------------------------
"Don't follow someone who's not going anywhere" John Mason
__________________
-----------------------------------------------------------
\"Don\'t follow someone who\'s not going anywhere\" John Mason
  #2 (permalink)  
Old July 17th, 2005, 02:05 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

SELECT * FROM ORMag where date = '5/17/2005' ORDER BY IssueNumber DESC

Please check the following link for more info on dates:
http://www.databasejournal.com/featu...le.php/1442021


Om Prakash
  #3 (permalink)  
Old July 19th, 2005, 06:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I would suggest you follow YYYY-MM-DD format.

_________________________
- Vijay G
Strive for Perfection
  #4 (permalink)  
Old July 30th, 2005, 11:50 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

The date format is up to you. Usually you would use your local date format. Are you looking for all dates that are in a specific year? Then use select...From ... Where DateDiff(yy, <date1>, <date2>) = 0



Similar Threads
Thread Thread Starter Forum Replies Last Post
choose between two directories and use one jjk2 PHP How-To 1 June 3rd, 2008 05:07 PM
Nested Choose Ryan Moore XSLT 6 November 9th, 2007 03:24 PM
Both "when" hit in choose estranda XSLT 2 June 18th, 2007 09:02 AM
xsl:choose djmarquette XSLT 5 March 29th, 2005 11:44 AM
"choose, when, otherwise" - problem natjimy XSLT 8 December 17th, 2004 02:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.