8
I am receiving from my database several dates entered by the user (the field is of the date type (yyyy-mm-dd)). What I want is to take that date and convert it to the name of the week day. For example:
<?php
$data_da_bd = "2014-08-13";
?>
The result would be: Wednesday.
date_default_timezone_set("Europe/Lisbon"); $data = "2014-08-09"; echo(strftime("%A",$data); I tried this and today’s name appears. It does not appear to me according to the date
– pc_oc
Your date is string. First you need to convert to Date. I will change my answer
– Felipe Fonseca
Thank you, that was the problem.
– pc_oc