I m entering date in front end as 10:00 AM , 12:00 PM etc…( means 12 Hours format).
now I want to save that value in database in time datatype column. How do I save that AM PM value into time datatype in MySQL and again want to display time appending AM PM on front end?
I m entering date in front end as 10:00 AM , 12:00 PM etc…(
Share
To insert:
To select:
EDIT:
I’ll just go ahead and presume you use mysql lib functions.
Then to retrieve the values:
This will return a result set where the formatted data is in the
*_formattedfieldsEDIT:
Adjusted
%m(month) to%i(minutes). A thank you to Donny for the well spotted slip up.