Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date problems

Status
Not open for further replies.

BigBadDave

Programmer
May 31, 2001
1,069
EU
How can I make dates earlier than 1970 and later then 2030 becuase if I go hight or lower than these then it gives errors ? Regards

Big Bad Dave

logo.gif


davidbyng@hotmail.com
 
what functions and timenotations do you use?
negative timestamps represent dates before 1970. mcvdmvs
"It never hurts to help" -- Eek the Cat
 
Do you use mysql BBDave?
//curdate() represents today.
$int_type=year; // can be day month or year

$interval=50; // how many of $int_type you want to go +-

// for interval to go back in time you need EITHER set it -50 OR use date_sub(blah ..... instead.

select date_add(curdate(),interval '$interval' '$int_type');
This will return todays date 50 years in the future. ***************************************
Party on, dudes!
[cannon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top