CodeIgniter Forums
Date Helper to Euro Format - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Date Helper to Euro Format (/showthread.php?tid=14220)



Date Helper to Euro Format - El Forum - 12-23-2008

[eluser]jongliko[/eluser]
Hi,

I'm new to CI and I can't figure out how to transform a Unix Time Stamp to dd/mm/yyyy with the date_helper.

Is it possible ?

Thanks for your help

Nicolas


Date Helper to Euro Format - El Forum - 12-23-2008

[eluser]jalalski[/eluser]
Well, it's standard PHP:
Code:
$datestr = date('d/m/Y', $unixtimestamp);

See http://php.net/date for all the options.


Date Helper to Euro Format - El Forum - 12-23-2008

[eluser]jongliko[/eluser]
Thanks for your answer.

I'm always trying to use the helpers provided by CI to discover every function of it. But of course it's difficult to do quicker than
Code:
date('d/m/Y', strtotime( $datetime))
to translate a datetime stamp. My bad. :-S

Thanks again for your help

Nicolas