Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Then your PHP version is older than 5. Use the second way.Smoothas said:I've tried what you said but I get " c " come out instead.
You either not used the second [tt]date()[/tt] call I posted or not like this :Smoothas said:I tried it the second way but still get a little c as the output.
$CrqDateTime = date('Y-m-d\TH:i:s.uP');
cat date.php
<?php
echo date('Y-m-d\TH:i:s.uP');
?>
[user@server php]# php date.php
X-Powered-By: PHP/4.4.6
Content-type: text/html
2009-10-01T14:05:47.uP
While the [tt]u[/tt] and [tt]P[/tt] format strings require even newer PHP version then [tt]c[/tt], your only way would be a workaround :Smoothas said:How can I get it looking like :-
2009-10-01T16:16:59.0156250+01:00
instead of the "uP" at the end ?
[navy]$CrqDateTime[/navy][teal]=[/teal][COLOR=darkgoldenrod]str_replace[/color][teal]([/teal][green][i]'%'[/i][/green][teal],[/teal][COLOR=darkgoldenrod]substr[/color][teal]([/teal][COLOR=darkgoldenrod]microtime[/color][teal](),[/teal][purple]2[/purple][teal],[/teal][purple]7[/purple][teal]),[/teal][COLOR=darkgoldenrod]date[/color][teal]([/teal][green][i]'Y-m-d\TH:i:s.%O'[/i][/green][teal]));[/teal]
[navy]$CrqDateTime[/navy][teal]=[/teal][COLOR=darkgoldenrod]substr[/color][teal]([/teal][navy]$CrqDateTime[/navy][teal],[/teal][purple]0[/purple][teal],-[/teal][purple]2[/purple][teal]).[/teal][green][i]':'[/i][/green][teal].[/teal][COLOR=darkgoldenrod]substr[/color][teal]([/teal][navy]$CrqDateTime[/navy][teal],-[/teal][purple]2[/purple][teal]);[/teal]