Page 1 of 1
Publish Date
Posted: September 23rd, 2024, 9:24 pm
by jorjie_s
Hello, just asking if there's a way that I could display publishdate "~~publishdate()~~" into a readable like Sept 23, 2024, thanks for the reply.
Re: Publish Date
Posted: September 24th, 2024, 9:01 am
by justinlakier
Hello,
Conversion would not be automatic, you would need to create your own code to handle this.
PublishDate returns a long numeric which would need to be converted into a string and split into the year/month/day substrings, so you may prefer to use
SysDate with different formats to get the year/month/day.
To convert the month from a number to a readable name, first make a list of the month names in order ["Jan", "Feb", etc], then plug in the month number as the index to get back the name you need. Once you have this and the year/day numbers, you can plug these all into a
maketext to make one readable string with commas and spacing.
Hope this helps,
Justin
Re: Publish Date
Posted: September 24th, 2024, 8:26 pm
by jorjie_s
Thanks for the reply, gonna try this one.