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

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.

Thanks Lafinboy

I;m looking into it....

Will shout if help needed

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.