Results 1 to 8 of 8

Thread: tracking the date

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Posts
    84

    Question 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

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Posts
    84

    Re: tracking the date

    im using an mysql as database

  4. #4
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    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()

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Posts
    84

    Re: tracking the date

    can anyone give an idea on how will i start my code

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Posts
    84

    Re: tracking the date

    how will i convert this code in vb.

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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
  •  



Click Here to Expand Forum to Full Width