how to format date field in MYSQL

前端 未结 5 1885
粉色の甜心
粉色の甜心 2021-01-25 07:13

All,

I need to retrieve the date in some specific format in MYSQL. For eg,

it should return month/year(10/2009).

My MYSQL version is 5.1.

Thanks

5条回答
  •  终归单人心
    2021-01-25 08:00

    For IIS, I just use a function:

    FUNCTION mySLQDate(xdate)
        IF xdate <> "" THEN
            mySLQDate = year(xdate) & "/" & month(xdate) & "/" & day(xdate)
        END IF
    END FUNCTION
    

提交回复
热议问题