Proper way to format date from database using javascript/jquery

前端 未结 3 1013
礼貌的吻别
礼貌的吻别 2021-01-17 06:11

I am calling my database which contains a datetime datatype. The date looks like this:

2005-05-23 16:06:00.000

I would like to display this in a table when a

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 06:32

    I ended up formatting the code in the controller action instead.

    I just cast the datetime property to a string using .ToString() and got the desired results.

    Thanks for the help though guys.

提交回复
热议问题