This topic is locked
[SOLVED]

 Custom date view .... help.

5/27/2010 6:28:32 AM
PHPRunner General questions
O
overmars author

Dear All,
I want to display a date field in VIEW page with format "long date plus time"

as examples : 15 May 2010 12:10:00
what procedures should I do?

i think this subject not available in "View As setting"
Thanks,

OV

A
ann 5/27/2010

Hi,
use View as settings dialog on the Visual Editor tab. Choose Custom option and add a code:

$value=date('d M Y h:i:s',$value["DateField"]);



where the DateField is actual date field.

O
overmars author 5/29/2010



Hi,
use View as settings dialog on the Visual Editor tab. Choose Custom option and add a code:

$value=date('d M Y h:i:s',$value["DateField"]);



where the DateField is actual date field.


Dear Ann,
I have try the code but my output for all date become ... 01 Jan 1970 07:00:02

what's wrong with my system ?
Thanks,

OV

A
ann 5/31/2010

Hi,
try this code:

$value=date('d M Y h:i:s',strtotime($data["DateField"]));
O
overmars author 5/31/2010

Great Ann,
This code working ....
Thanks

OV



Hi,
try this code:

$value=date('d M Y h:i:s',strtotime($data["DateField"]));