dsg138
asked on
PHP Convert Date/Time to Day of Week
Experts, I'm adding sports data to my Database from an XML Feed.
One of the important items is the event-date-time. Here is an example:
<event-metadata event-status="" league="NFL Football" event-date-time="09/04/201 4 08:30 PM"/>
$game_time = "09/04/2014 08:30 PM";
I add "09/04/2014 08:30 PM" to my database for this event.
This part works fine today.
Here is my question:
I'm now trying to also add the "Day of the Week" to my database.
So something like this automatically calculating: $game_day = "Thursday";
In the example above, I'm trying to automatically get the "Thursday", or even "5" from the value in $game_time.
Any help would be great.
Thanks,
-Dan
One of the important items is the event-date-time. Here is an example:
<event-metadata event-status="" league="NFL Football" event-date-time="09/04/201
$game_time = "09/04/2014 08:30 PM";
I add "09/04/2014 08:30 PM" to my database for this event.
This part works fine today.
Here is my question:
I'm now trying to also add the "Day of the Week" to my database.
So something like this automatically calculating: $game_day = "Thursday";
In the example above, I'm trying to automatically get the "Thursday", or even "5" from the value in $game_time.
Any help would be great.
Thanks,
-Dan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER