Friday, 2 October 2015

Kentico 7 Get Current Date Time using macro

Leave a Comment
In kentico 8, you can call macro method to show date time information just like C# code which is :

{%DateTime.Now%}

But for kentico version 7, you can not call date time in macro using above code. So i have wondering how to call the date time using macro? and also want to format the date time.

Below is a example how you can show date time in kentico 7 using macro.

Get Date Time

{% CurrentDateTime%}



Format Date Time 

{% GetDateTime(CurrentDateTime, "MM dd yyyy")%}

Hopefully the above solution help someone.

Thanks. By
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)

0 comments:

Post a Comment

Subscribe to our newsletter to get the latest updates to your inbox.

Your email address is safe with us!




Founder of developersnote.com, love programming and help others people. Work as Software Developer. Graduated from UiTM and continue study in Software Engineering at UTMSpace. Follow him on Twitter , or Facebook or .



Powered by Blogger.