Way to get the d/mm and yyyy portion of the post date?

Topics: Themes
Jan 12, 2011 at 4:06 AM

Hello,

Playing around setting up my own theme. I'm working with the Post.DateCreated. I'd like to get just the day/month portion of the date and the year separately. So it would look like 11/01 and 2011. I'm guessing there's no built in method for doing this and I'd have to muck around with the date or string tools in C#?

thanks

Coordinator
Jan 12, 2011 at 7:10 AM

Post.DateCreated.ToString("d/MM")

Post.DateCreated.ToString("yyyy")

More here.

Jan 12, 2011 at 4:06 PM

Thanks