您的位置:首页 > 博客中心 > 数据库 >

工作日记-7 oracle 字符串转为数字

时间:2022-03-13 23:55

数据源是时间,进行时间段的比较

数据格式 to_char(sysdate,‘HH24:mi‘)   如,15:00

> < 都是进行字符串的比较比如 4:00是大于13:00,需将之转为数字类型比较

to_number(REPLACE(a.forbidtimestart,‘:‘,‘.‘)) > to_number(REPLACE(to_char(sysdate,‘HH24:mi‘),‘:‘,‘.‘))

热门排行

今日推荐

热门手游