I have some values ββthat are milliseconds since the ie microtome(true) era in my MySQL database that go out as strings, I need to convert them to the standard PHP () date
microtome(true)
$updated = 1349697975.9381; $nUpdated = date($updated, "l jS F \@\ g:ia");
This returns an empty string, who can help?
It should be date ( string $format [, int $timestamp = time() ] )
date ( string $format [, int $timestamp = time() ] )
You have the wrong position
$nUpdated = date("l jS F \@ g:ia",$updated);
Output
Monday 8th October @ 2:06 pm
You have date() arguments back (the timestamp is the second parameter).
date()
Try updating:
$nUpdated = date("l jS F \@ g:ia", $updated);
Source: https://habr.com/ru/post/1438432/More articles:How to throw an exception in Antlr grammar - antlrHow to use Unity DI to load an assembly with dependencies, and then register internal elements - dependency-injectionRailtie: How to access initializer and lib boot hooks? - ruby-on-railsWhat happens if StreamReader or StreamWriter are not closed? - c #NTEventLogHandler from Python executable - pythonEntity Framework AddObject for certain INSERT IN columns only - c #Is there node-waf for Node.js on windows? - windowsIs there a faster way to input input in python? - performanceData-Context-Interaction (DCI) and programmable event in javascript - javascriptpython mapping function acting on a string of numbers - pythonAll Articles