what is the marco method for <%# GetDate("NewsReleaseDate") %>

Nitin Patil asked on April 7, 2016 16:22

what is the marco method(text/xml) for "<%# GetDate("NewsReleaseDate") %> " this Aspx code.....please give me code.

Thanks Nitin

Recent Answers


David te Kloese answered on April 7, 2016 16:37 (last edited on March 24, 2018 12:15)

Hi,

What would you like to do with it? Just get a DateTime object?

You can do something like this:

- {%NewsReleaseDate%}
- {%NewsReleaseDate.ToDateTime()|(user)zbynekh|(hash)e829ec86cb42a0ccb14ca6237aafad8a6c82e60fbdfb984d0e54ac69f7a3ab08%}
- {%NewsReleaseDate.ToDateTime().Day|(user)zbynekh|(hash)f278e5ddfd06dbe79d72225c39cd44d8401effee17ee9d3a4ffdfdd2a60be9a3%}
- {%NewsReleaseDate.ToDateTime().DayOfWeek|(user)zbynekh|(hash)2fcd5e7ac7efe8ee5081daed89539d52cf07d96f5f2e276b72fa6ac03bc304ba%}

Find more macros here:

https://docs.kentico.com/display/K9/Reference+-+Macro+methods

David

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 7, 2016 16:41 (last edited on March 24, 2018 12:15)

You might try to reference this page for your answer

https://docs.kentico.com/display/K9/Reference+-+Macro+methods

I believe it would be something on the lines of {% NewsReleaseDate.ToShortDateString() |(user)zbynekh|(hash)a0ff6687a8fcbbb25616d2fc6c690a7824e89f2090922d17233c65a3d4b0ac6c%}

1 votesVote for this answer Mark as a Correct answer

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