Select Varchar as Date

前端 未结 4 1743
攒了一身酷
攒了一身酷 2020-12-20 07:02

I want to select a varchar field as a date field

For example a field has this value \"30.12.2011 21:15:03\"

and when i select this

select DAT         


        
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-20 07:38

    select DATE from TABLE where cast(DATE as date) = '30.12.2011'

    Date field is a timestamp

提交回复
热议问题