sql server - SQL select HTML5 datetime-local -


using datetime-local form field, , inserting value sql 2014 smalldatetime field. when querying database populate form field editing, i'm using

select format(mydate, 'yyyy-mm-ddthh:mm:ss') mydate 

my form field code is:

<input type="datetime-local" name="mydate"      id="mydate" required      value="<cfoutput>#mydate#</cfoutput>"> 

when populating above form field database value, returns correct date , time indicates am. example: value in database table 2016-11-03 13:09:00 value in form shows 11/03/2016 01:09 am

how can change sql format accurately populate form field? should 11/03/2016 01:09 pm?

thanks

i leave formatting in front end. however, if change hours uppercase give time in 24 hour format.

select format(mydate, 'yyyy-mm-ddthh:mm:ss') mydate 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -