mysql date formatting with php

前端 未结 6 1760
庸人自扰
庸人自扰 2021-01-29 02:56

I have a date (\"mm/dd/yyyy\") and I want to convert it to a MySQL DATE data type (like yyyy-mm-dd)

How do I do it with PHP?

6条回答
  •  面向向阳花
    2021-01-29 03:24

    Lots of ways to do it. I like always converting my dates to a timestamp cause I find it easiest to then do what I want.

    In which case:

    
    

    http://codepad.viper-7.com/Z9vDv7

提交回复
热议问题