1

We have a offer xml which is published and we want to read the last published date of that offers xml page to be displayed on (offers asp page) where we display all the offers at the page template level.

Tridion Version : Tridion 2011 SP1 Templating : VB Script [Legecy]

  • 1
    I'll let others offer a technical answer, but I typically recommend against using the published date directly. Especially with DTAP and content updates, the business often wants to control what date displays independent of when it's published to do things like "back dating" an rendered item. – Alvin Reyes Jun 15 '16 at 8:47
  • I would like to give you a heads up that after 30 June 2016 SDL Tridion 2011 SP1 will become fully retired, and no further service packs or hotfixes will be available. Also the VBscript Templating model has been deprecated and you really should consider upgrading to a different templating model. This certainly makes sense when you are looking at developing new feature for existing templates. You don't want to invest time in new features on a deprecated model. – Bart Koopman Jun 15 '16 at 9:14
  • bart Yes we are going to upgrade soon – Anand NS Jun 15 '16 at 9:24
2

In VbScript, the Now() function will get you the current Date/Time. There are various other functions you can use to format or manipulate it. You can easily Google to find out about these.

You could use this to output the publish date in the XML. In the page template that renders offers.asp you could output ASP code that reads the XML and extracts the date.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.