I would like to format the date as "dd/MM/yyy". If I try to use this as ToString() argument, I got an error. Without any dateTime format, the date apprear as: 2014-09-17T00:00:00
Damn, I could'nt get thru this. I checked the logfile, there's an exception concerning the ToString method. "The best overloaded method match for 'string.ToString(System.IFormatProvider)' has some invalid arguments"
I'm goingo to investigate, never had an stupid issue like this
maybe you have an issue taking the value of your parameter and translation to a datetime datatype? Have you also coded around null values in the property?
Format date error
Hello, in this snippet:
I would like to format the date as "dd/MM/yyy". If I try to use this as ToString() argument, I got an error. Without any dateTime format, the date apprear as:
2014-09-17T00:00:00
Any hints?
Hi Barbacan,
What if you do something like this:
Hope this helps,
/Dennis
Hi Dennis,
in this case I got an ("dataArticolo").ToString("dd/MM/yyyy"), basically it does not print out the value itself.
Hi Barbacan,
How about this?
Try to see this post: http://our.umbraco.org/forum/using/ui-questions/44732-cannot-format-DateTime-using-umbracolibraryFormatDateTime%28%29
Hope this helps,
/Dennis
Damn, I could'nt get thru this. I checked the logfile, there's an exception concerning the ToString method.
"The best overloaded method match for 'string.ToString(System.IFormatProvider)' has some invalid arguments"
I'm goingo to investigate, never had an stupid issue like this
maybe you have an issue taking the value of your parameter and translation to a datetime datatype? Have you also coded around null values in the property?
You could try debugging with
If the datetime parser is struggling with translation of you property to a datetime then you could use
where the second paramater is the format that you have for the format representation?
is working on a reply...