[EMAIL PROTECTED] (Rajesh Fowkar) writes:
> Now while updating the form I want to retrieve the date and take out day,
> month and year from that date and display the correct selection in the
> combo. I could not find any function like say
> day($dbdate);
> month($dbdate);
> year($dbdate);
> Am I missing something ? Is there anyway to accomplish the above ? or I
> will have to store these three values separatly in the database rather than
> as a date.

Well, there is actually a quite good support for manipulating strings
in php. Have a look at the format of your date variable, and use
either the regexp functions or string functions like split and

Let's say your date is in a format like 'YYYY-MM-DD hh:mm:ss'. Then
somehing like

list($yy, $mon, $dd, $hh, $min, $ss) = split(" |:|-", $date);

would do the trick.

A mathematician is a machine for converting coffee into theorems.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to