Hi

We generate an XML sitemap and I'd like to swap clunky server code for a 
render tag, to get the last modified time.

<%!! Context:CurrentIndex.Page.ChangeTime !!%> gives too much info (time) 
plus in the wrong format, so I'm trying to grab the year, month and day 
parts, and rearrange.

Using .Split() works for the month and day, but I can't strip the rest of 
stuff after the year - any ideas why this wouldn't work? (I've added 
comments to clarify):

<%!! Escape:Text(Context:CurrentIndex.Page.ChangeTime).Split(/)[Int:2].
PadRight(Int:4) !!%> // splitting on third '/' and then taking next 4 chars
<%!! Escape:Text(Context:CurrentIndex.Page.ChangeTime).Split(/)[Int:2].Split( 
)[Int:0] !!%> // splitting on third '/' and then the next space

I always get something like '2014 16:53:34...' - how can I just get the 
first four characters 

Thanks

Neil

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reddot-cms-users+unsubscr...@googlegroups.com.
To post to this group, send email to reddot-cms-users@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to