This is a discussion on retrieve the day of the week within the alt.comp.lang.php forums, part of the PHP Programming Forums category; ..oO(Kram Techie) >i used %a to get short day "SELECT DATE_FORMAT('$datetime', '%a')" >works a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Kram Techie schrieb:
> Hi > > i am trying to find a way to retrieve the day of the week from a mysql date. > example 11 Mar 2008 22:32:06 > should equate to Tue, or Tuesday > > Googled but no Joy. many online examples but i need a hint or some source to > work with. > > Mark > > you can do that with php ... $time = strtotime(mysql date); echo date('D', $time); for sure a solution in mysql is more efficient mfg k42b3 |
|
|||
|
"Christoph Kappestein" <meecrob@k42b3.com> wrote in message
news:frgfnn$6hb$02$1@news.t-online.com... > Kram Techie schrieb: >> Hi >> >> i am trying to find a way to retrieve the day of the week from a mysql >> date. >> example 11 Mar 2008 22:32:06 >> should equate to Tue, or Tuesday >> >> Googled but no Joy. many online examples but i need a hint or some source >> to work with. >> >> Mark >> >> > > you can do that with php ... > > $time = strtotime(mysql date); > echo date('D', $time); > > for sure a solution in mysql is more efficient > > mfg > k42b3 $time = strtotime("24 Feb 2008 22:51:08"); echo date('D', $time); Sun as MySQL works a dream I'll stick with that. Mark |
![]() |
| Thread Tools | |
| Display Modes | |
|
|