I want to show Date only instead of Date & Time

Nitin Patil asked on April 6, 2016 14:13

hi,

I want to show Date only instead of Date & Time. I Use NewsReleaseDate Transformations and change data type "Date", but still both showing. what can i do?

Correct Answer

Chris Hamm answered on April 8, 2016 15:00

Personally I often use {% GetDateTime(DateFieldName, "MM/dd/yyyy")%} often.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Roman Hutnyk answered on April 6, 2016 14:33

What type of transformation are you using?

If you're using ASPX there are a couple of methods to achieve this:

<%# GetDate("NewsReleaseDate") %>

<%# FormatDate(DateTime.Now) %>

You can find all the methods here.

2 votesVote for this answer Mark as a Correct answer

Nitin Patil answered on April 6, 2016 15:11

Hey Thank you very much. its work for Aspx.

what is the method for Text/XML. i cant found.

0 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on April 6, 2016 17:04

Please see macro methods.

1 votesVote for this answer Mark as a Correct answer

Nitin Patil answered on April 12, 2016 08:00

Thanks Chris & Roman. I have got idea from your suggestions and i write this macro code "{% GetDate(NewsReleaseDate)%}" for showing date only. and its work.

Thanks Nitin

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.