Skip to content

Tag: datetime

DateTime with microseconds

In my code, I’m using DateTime objects to manipulate dates, then convert them to timestamp in order to save them in some JSON files. For some reasons, I want to have the same thing as DateTime (or something close), but with microseconds precision (that I would convert to float when inserting inside the …

Reformatting a datetime field into a more readable format

I am pulling a datetime field out of a database with PHP in the form of this: 2015-09-22T13:00:00 When I populate my html with this value it returns this (note: without the ‘T’): 2015-09-22 13:00:00 No biggie. What I’d like for the output format to look like is this: September 22nd, 2015 &#8…