asp.net mvc 4 - Html element <time> date format without HH MM SS -


i using html <time> element display date.i have display date-part.from back-end getting date "13/07/2016 00:00:00" hh mm ss.

i used below line convert date-time date.

<time class="meta" datetime="dd/mm/yyyy">13/07/2016 00:00:00</time> 

but still output same "13/07/2016 00:00:00".

i referring :- html time tag - correct date format

i think there confusion regarding tag.

according mdn:

this element intended used presenting dates , times in machine readable format. can helpful user agents offer event scheduling user's calendar.

in code, <time class="meta" datetime="dd/mm/yyyy">13/07/2016 00:00:00</time>, output not change format specify datetime attribute, because meant machine reading, text part of tag 13/07/2016 00:00:00 visible on page humans.

if want change format of output of this. think should use sort of javascript format value, or hackish way, can split space , use first index date.


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 -