Page 1 of 1

Date help needed

Posted: Mon Sep 29, 2003 6:18 am
by mathewvp
hi,
My requirement is data to be added to database depending on dates.Like,If the user wants to add data for the next 10 days,the data should be added with a corresponding column containing the next 10 days' dates.Then if he logs in tomorrow and wishes to add data for another 100 days,it should find the last date added and then add data with the next date starting from that date.Also I would want to display these dates to the user.So can you suggest which type to be used for database field and also the date functions(mysql as well as php) to be achieved.Any piece of code will be appreciated.
Thanks

Posted: Mon Sep 29, 2003 8:40 am
by devork
i think unix timestamp will solve the problem
and also refer to mysql date and time functions manual a very good resource for it

Recent dates + future dates

Posted: Mon Sep 29, 2003 9:00 am
by mathewvp
devork,
Thanks but I dont know how to do it .Thats why I posted here.
Let me put it more clearly.

"select the last date entered in the database";

If the date is Oct10 and the user wants to add entries for Oct 11,12 13

"insert into table values('data','oct11')"
......
......
likewise for Oct12 and 13
The format I need is just year,month and day.No time is required.