DateTime display format

DateTime display format

Dennis ChanDennis 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

Answers

  • allanallan Posts: 63,831Questions: 1Answers: 10,518 Site admin
    Answer ✓

    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 and string.

    Allan

This discussion has been closed.