How to convert a string to a date in sybase

前端 未结 4 1568
甜味超标
甜味超标 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:07

    Use the convert function, for example:

    select * from data 
    where dateVal < convert(datetime, '01/01/2008', 103)
    

    Where the convert style (103) determines the date format to use.

提交回复
热议问题