User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 422,986 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,944 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1431 | Replies: 3
Reply
Join Date: Jul 2006
Posts: 9
Reputation: GavinC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
GavinC GavinC is offline Offline
Newbie Poster

Help needed with Dates and Access

  #1  
Jul 17th, 2006
Hi there.

I have an Access database with 2 fields. Client Name and Date
The Date is only entered with month and day and year i.e:

Gavin | 2006/06/29
Mr X | 2007/07/15
Mr Y | 2006/06/30

and so on, some dates are the same for reasons of the following... I am using Dreamweaver and trying to access the database according to date.

i.e: I need for the ASP page to check what the current date is "today" and match it up with the dates in the Database. Now by getting the date is fairly easy. I think.

 
Dim dDate
dDate = now()

Response.Write dDate
Response.End()

Should give you the current date, ( 7/17/2006 and the time), So now I have the date and time, but its rearanged the wrong way . How do I switch this around to correspond with the db and make it easy for me to reference..>?

Further more how can I get this right to retrieve information from the database 5 days ahead of schedule...

i.e: if the due date in the db is 7/22 and today is 7/17 then it must get that info for the date 5 days ahead of what todays date is. If it makes no sense I understand ....

Can anyone help with this

Thank you
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation: Lafinboy is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 7
Lafinboy's Avatar
Lafinboy Lafinboy is offline Offline
Junior Poster

Re: Help needed with Dates and Access

  #2  
Jul 17th, 2006
Have a quick google for the functions DatePart and DateAdd.

DatePart will help you format a given date in the format you require it.
DateAdd will add (or substract) a given time period (seconds, minutes, hours, days, months, years, etc) from a given date.

With these two functions you can perform date/time manipulation for use in your code.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.

Lafinboy Productions
:: Website Design :: Website Development ::

Reply With Quote  
Join Date: Jul 2006
Posts: 9
Reputation: GavinC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
GavinC GavinC is offline Offline
Newbie Poster

Re: Help needed with Dates and Access

  #3  
Jul 18th, 2006
Thanks Lafinboy

I;m looking into it....

Will shout if help needed
Reply With Quote  
Join Date: Jul 2006
Posts: 9
Reputation: GavinC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
GavinC GavinC is offline Offline
Newbie Poster

Re: Help needed with Dates and Access

  #4  
Jul 19th, 2006
Hey it helps to Google the RIGHT thing...

I have found a good site that explains alot about Date Formating and above mentioned problems.

Getting sorted now to impliment what I learned.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 3:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC