mysgl, mysql date function |
mysgl, mysql date function |
cookie mutza |
Oct 13 2006, 03:06 PM
Post
#1
|
Group: Members Posts: 7 Joined: 13-October 06 Member No.: 426 |
can anyone tell me anything about mysqls date functions
|
cookie mutza |
Oct 13 2006, 03:08 PM
Post
#2
|
Group: Members Posts: 7 Joined: 13-October 06 Member No.: 426 |
and how i can call them through php
|
Sparkyg |
Oct 14 2006, 06:21 AM
Post
#3
|
Member Group: Members Posts: 46 Joined: 29-September 06 From: Suffolk UK Member No.: 270 |
Hi There
To display dates from mysql, a couple of funtions I use, just pass in the date in your SQL result, the format can be changed to display any format you like function ConvFromMySQL2($sqldate) { $format= "d F Y"; $mydate = date($format,strtotime($sqldate)); return $mydate; } function ConvFromMySQL3($sqldate) { $format= "Y-m-d"; $mydate = date($format,strtotime($sqldate)); return $mydate; } to use mysql date functions in mysql just stick them in your query cheers Sparky |
Lo-Fi Version | Time is now: 23rd April 2024 - 02:01 AM |