|
-
Feb 18th, 2007, 11:02 AM
#1
Thread Starter
Lively Member
tracking the date
can anyone help me about this problem... im doing a reservation system.. and i have my date reserved and end date reserved... how would i know that one of my customer is near to her end date reserved...
example im CUSTOMER 1 reserved at February 18,2007 and her end date resevation is on February 24, 2007. before Feb. 24, 2007 i need to inform my customer that her reservation will be ended.. how would i know that automatically.. can anyone give me an idea...
thanks
-
Feb 18th, 2007, 11:07 AM
#2
Re: tracking the date
If this is in access you can use DateDiff() in WHERE clause of query, compare date in database with current date .... return records with difference <= 1 day.
-
Feb 18th, 2007, 11:09 AM
#3
Thread Starter
Lively Member
Re: tracking the date
im using an mysql as database
-
Feb 18th, 2007, 11:35 AM
#4
Re: tracking the date
http://dev.mysql.com/doc/refman/5.1/...functions.html
DATEDIFF(expr1,expr2)
DATEDIFF() returns expr1 – expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation.
mysql> SELECT DATEDIFF('1997-12-31 23:59:59','1997-12-30');
-> 1
mysql> SELECT DATEDIFF('1997-11-30 23:59:59','1997-12-31');
-> -31
Nest SYSDATE() or NOW() in DATEDIFF()
-
Feb 19th, 2007, 03:02 AM
#5
Thread Starter
Lively Member
Re: tracking the date
can anyone give an idea on how will i start my code
-
Feb 19th, 2007, 07:34 AM
#6
Re: tracking the date
It looks to me as though leinad31 has given you a start.
Is there something that you don't understand about his example?
-
Feb 19th, 2007, 01:05 PM
#7
Thread Starter
Lively Member
Re: tracking the date
how will i convert this code in vb.
-
Feb 19th, 2007, 01:14 PM
#8
Re: tracking the date
What does your reservation form look like?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|