Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member medlington's Avatar
    Join Date
    Nov 2005
    Location
    Sheffield, UK
    Posts
    377
    Member #
    11968
    Liked
    4 times
    Hi,

    Im having issues with CURDATE().

    I have a script that is going through a database and checking entries for certain dates, my script seems to work fine untill the date range goes over into next month and then it doesnt seem to get any of the data from the DB.

    Is there a problem using CURDATE()+28days if those 28 days go into next month?

    I have a feeling that when it goes over it is looking for a date like : 2011-10-35 instead of 2011-11-04

    does that sound correct? is there a way to correct it if so?

    is there a way to do something like CURDATE()+1 MONTH + 28DAYS?

    Thanks

  2.  

  3. #2
    Senior Member medlington's Avatar
    Join Date
    Nov 2005
    Location
    Sheffield, UK
    Posts
    377
    Member #
    11968
    Liked
    4 times
    ahha fixed it now, it was that CURDATE()+35 would return 0000-00-00 but if I use

    CURDATE() + INTERVAL 35 DAY";

    it seems to work


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:15 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com