jp.principio.mail-gmail
-
9/29/2011 12:31:27 AM
how to custom format datetime using eval.
Hi,
as the subjects says, how can I custom format (MMMM dd, yyyy) the datetime in blogpost using eval in cms_transformation.
I used <%# Eval("BlogPostDate", "BlogPostDate", "{0:dd MMMM yyyy}") %> but no luck.
I also used <%# Convert.ToDateTime(Eval("BlogPostDate").ToString("MMMM dd, yyyy") %> but still no luck.
I used <%# Convert.ToDateTime(Eval("BlogPostDate").ToString("d") %> and it worked! but not my preferred format. :(
Thanks,
JP
|