How would i send time to the database like
hours minutes (5:55PM)
and date like
day/month (11/03)
i want them in to seperate varibles ive googled it but alls ive found is them together
date("d/m/y : H:i:s", time());
but i want to send them to the database as ive put and seperate
thanks
time & date
time & date
I would put a signature.. BUT, i don't have the time.
Re: time & date
so you want a single field for the individual parts of the date and time?
to break them up into individual variables, assign each one individually.
to break them up into individual variables, assign each one individually.
$day = date("d", time()); $month = date("m", time()); ... etc
Re: time & date
Torniquet wrote:so you want a single field for the individual parts of the date and time?
to break them up into individual variables, assign each one individually.
$day = date("d", time()); $month = date("m", time()); ... etc
no i want
time as $time = 5:55PM or whatever the current time is but as that format
date as $date = 10/03 (day/Month) or whatever the current date is but as that format
I would put a signature.. BUT, i don't have the time.
Re: time & date
If you store the time as a DATETIME column you can then use the DATE_FORMAT() mysql function to format it how you like when selecting the data.
Re: time & date
expand on this please? first time ive heard anything about this?jacek wrote:If you store the time as a DATETIME column you can then use the DATE_FORMAT() mysql function to format it how you like when selecting the data.
I would put a signature.. BUT, i don't have the time.
Re: time & date
http://www.w3schools.com/sql/func_date_format.aspashwood wrote:expand on this please? first time ive heard anything about this?jacek wrote:If you store the time as a DATETIME column you can then use the DATE_FORMAT() mysql function to format it how you like when selecting the data.