If your property on the document is of type Textstring, you should be able to simply enter any kind og string without Umbraco manipulating it afterwards :-) Does this string come from a DateTime object, perhaps? If so, you should be able to use the .ToShortDateString(); method on the DateTime object.
THe property is of type textstring but if I enter 12-07-12 for example it is everytime rendered as date. I can not use ToShortDateString because sometimes it is a textstring.
Dont know why umbraco renders it as a date.
What i have done now to solve the issue is to use the GetProperty().Value method and this seems to work
Textstring is interpreted as date
Hello,
I have created a property (type texstring).
If i enter a string like "27/05/12" umbraco automatically adds 00:00:00
How can I remove this timestamp?
Hi dominik,
If your property on the document is of type Textstring, you should be able to simply enter any kind og string without Umbraco manipulating it afterwards :-) Does this string come from a DateTime object, perhaps? If so, you should be able to use the .ToShortDateString(); method on the DateTime object.
Let me know how it works out.
All the best,
Bo
THe property is of type textstring but if I enter 12-07-12 for example it is everytime rendered as date. I can not use ToShortDateString because sometimes it is a textstring.
Dont know why umbraco renders it as a date.
What i have done now to solve the issue is to use the GetProperty().Value method and this seems to work
is working on a reply...