database retrieval by date

This is a discussion on "database retrieval by date" within the Classic ASP section. This forum, and the thread "database retrieval by date are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 9th, 2004, 12:36
Junior Member
Join Date: Jun 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
database retrieval by date

Any ideas how to retrieve info from a database by date - the most recent date first? I have a date field Month/Day/Year (intDate) and an ID number (intID) for my records

  #2 (permalink)  
Old Aug 9th, 2004, 12:57
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
You could use-
Code: Select all
TheQuery = "Select * from tblTableName Order by intDate Desc"
as your SQL query to retieve the results in reverse date order (latest first)
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #3 (permalink)  
Old Aug 9th, 2004, 13:07
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
whats the int do? Never seen that before... I was having this problem too, but ended up using an ID field... (it was for a blog-style thing though, so the date was always current).
  #4 (permalink)  
Old Aug 9th, 2004, 13:28
Junior Member
Join Date: Jun 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
How simple and effective - many thanks
Closed Thread

Tags
database, retrieval, date

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple table data retrieval with function Wheatus7 Databases 0 Jun 26th, 2007 13:01
XML Code for transfering data from one SQL Server Database to another database plolla Other Programming Languages 1 Aug 3rd, 2006 18:37
Changing date format in date picker AdRock JavaScript Forum 1 Aug 1st, 2006 17:16
File Retrieval gfrankel Databases 3 May 12th, 2005 00:27
asp date Monie Classic ASP 1 Sep 21st, 2004 04:38


All times are GMT. The time now is 04:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43