» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2006, 01:46 PM
gazelle gazelle is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gazelle is on a distinguished road
Red face working with Dates

Hi guys

I am having a lot of problems working with dates:-

First of all I have a table called articles, and I have a date field, which is in text format, and I insert the dates for example 02/11/2003 in it. Now the user can enter articles that are bigger than todays date, however I want to display only those that are smaller than todays date. Is it possible to convert the text field I have for dates into numeric format? And if so, will the comparison work? At the moment it is not working since for the database, 11/02/2000 is bigger than 01/04/2003. Another thing, I wish to keep the Articles dates in text format for my purposes.

My second problem is when coming to compare dates:-

I have this sql statement
sql = sql & " AND newsArticles.newsDate BETWEEN " & "'" & FromDate & "'" & "AND '" & ToDate & "'"

but it is not working prope -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-26-2006, 01:47 PM
einstien einstien is offline
Junior Member
 
Join Date: Jul 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
einstien is on a distinguished road
Default

Why don't you just use a date field of the DATE type? Ms Access has a Date/Time field and (My)SQL has a date field of the YYYY-MM-DD format.
All you have to do (once you have a proper date field) is convert your date to the current format. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  #3  
Old 08-26-2006, 01:48 PM
Freebie Freebie is offline
OSP Starters
 
Join Date: Jun 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Freebie is on a distinguished road
Default

Just to state obvious you could use datediff or dateadd functions -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PW not working? Fnancy MySQL Forums 1 02-02-2007 06:26 AM
working with LPannel? Blaine Web Hosting Industry 1 01-10-2007 02:41 AM
root password not working? ashmay MySQL Forums 1 11-19-2006 05:09 AM
Working on internet, Work at home moms, Intresting !! alex General Talk 14 11-01-2006 01:58 AM
SurfControl Joins Anti-Phishing Working Group outsourcingplans Web Hosting News 0 11-25-2005 02:00 PM


All times are GMT. The time now is 10:33 AM.