How to convert a string to a date in sybase

前端 未结 4 1570
甜味超标
甜味超标 2020-12-08 08:16

I need to specify a date value in a sybase where clause. For example:

select * 
from data
where dateVal < [THE DATE]
4条回答
  •  没有蜡笔的小新
    2020-12-08 09:03

    Several ways to accomplish that but be aware that your DB date_format option & date_order option settings could affect the incoming format:

    Select 
       cast('2008-09-16' as date)
       convert(date,'16/09/2008',103)
       date('2008-09-16')
    from dummy;
    

提交回复
热议问题