how to remove time from datetime

前端 未结 10 1648
清酒与你
清酒与你 2020-12-01 10:18

The field DATE in the database has the following format:

2012-11-12 00:00:00

I would like to remove the time from the date and return the d

10条回答
  •  时光说笑
    2020-12-01 10:57

    Personally, I'd return the full, native datetime value and format this in the client code.

    That way, you can use the user's locale setting to give the correct meaning to that user.

    "11/12" is ambiguous. Is it:

    • 12th November
    • 11th December

提交回复
热议问题