conditional format date |
5/1/2008 05:18:34 | |
| PHPRunner General questions | ||
|
G
garethp authorDevClub member
I require a date field in a list screen to be red if it is the current date. I have applied the follwing custom code on the visual editor and this works great.. $curd = date("Y-m-d",strtotime(now())); if ($value ==$curd) { $value = "<font color=red>".$value."</font>"; $value = "<strong>".$value."</font>"; }
|
||
|
|
Alexey admin 5/1/2008 |
|
Gareth, $value = "<font color=red>".format_shortdate(db2time($value))."</font>"; |
|
|
G
|
garethp authorDevClub member 5/2/2008 |
|
works a treat - thankyou as always for great and quick support |
|