DateTime display format
DateTime display format
Dennis Chan
Posts: 18Questions: 8Answers: 0
I know GetFormatter can be used to change the format of display DateTime field. However, GetFormatter can only apply to string type in model. If my field in the model is DateTime, error will be occurred. How can I change the DateTime display format while the field in the model is DateTime instead of string?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The problem with
DateTime
is that it has no direct representation in JSON. The types used in the model need to be restricted to what we can use in JSON, which for practical purposes means the number types andstring
.Allan