View Full Version : String -> Date
stevieke
23 Apr 2009, 7:08 AM
Hello everyone
$Project-> StartDate =new DateTime($Result-> Get_StartDate());
$Result-> Get_StartDate() is on this moment a string...
How can i convert it to a date in format 24/03/2009
thanx in advance
Steven
mystix
28 Apr 2009, 7:00 PM
Hello everyone
$Project-> StartDate =new DateTime($Result-> Get_StartDate());
$Result-> Get_StartDate() is on this moment a string...
How can i convert it to a date in format 24/03/2009
thanx in advance
Steven
that looks like pure PHP to me. wrong forum perhaps?
syscobra
29 Apr 2009, 5:55 AM
This is not Ext related because its a php thing but as i know something and i can google for it here is your response:
$startDate = date("d/m/Y", strtotime($Result-> Get_StartDate()));
Now you have a date var with d/m/Y format.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.