Kentico - Smart Search Date w/o Time


/ Published in: ASP
Save to your folder(s)

Wanna lose the time portion of the date something was created in a smart search result!?!?


Copy this code and paste it in your HTML
  1. <%-- Replace --%>
  2.  
  3. <%# GetDateTimeString(ValidationHelper.GetDateTime(Eval("Created"), DateTimeHelper.ZERO_TIME), true) %>
  4.  
  5. <%-- With --%>
  6.  
  7. <%# ValidationHelper.GetDateTime(Eval("Created"), DateTimeHelper.ZERO_TIME).ToShortDateString() %>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.