php - How to Retrieve the value from Datetime-local input? -
i experimenting php. creating simple form requests user input their, name, telephone, , appointment time. once user inputs these values, want create calendar event based on these data. (a calendar event in apple ical or google calendar)
i decided use third party framework, addevent, me create .ical file can add icalendar or google calendar. however, ran issue.
i used datetime-local input type gather appointment time issue. when that, , try echo out, prints out in specific format (2016-06-30t02:02).
i want know how can alter format (07/13/2016 16:00).
thanks,
you can use following:
echo strftime('%d/%m/%y %h:%m', strtotime($datetime_loacl_input));
Comments
Post a Comment