hi, i was wondering if anyone could clear up a small problem i have.
could anyone enlighten me on how to insert a date/time into a date/time field? do you have to use the php date/time function?
also,
once a date/time is entered into the field, how would you go about editing it say for example increase the date by 1 day every day? (not reset it to the current date)
thanks, any help appriciated.
time/date function into time/date type field in mysql
Moderator: General Moderators
What is the current date formate for date/time you have?
If it's like Jan 05, 2005 at 12:58 PM -- then it'd be varchar
If it's a unix timestamp -- then int
etc...
Also, to get your date to change every day you'd have to have a script ran every day that would do that, or run a cron job
If it's like Jan 05, 2005 at 12:58 PM -- then it'd be varchar
If it's a unix timestamp -- then int
etc...
Also, to get your date to change every day you'd have to have a script ran every day that would do that, or run a cron job
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
If i need to change a lot of timestamps everyday it's probably a bad solution.. In that case i would suggest calculating the actual timestap based on the difference between now() and the original timestamp.
Anyway, a little search on this forum will return a load of useful posts that mention the options to handle date and time between php and mysql. Probably ADOdb has the most powerful feature because you can it accros different DBMS.
Anyway, a little search on this forum will return a load of useful posts that mention the options to handle date and time between php and mysql. Probably ADOdb has the most powerful feature because you can it accros different DBMS.