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

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

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

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

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

原文地址:https://www.cnblogs.com/narci/p/3977603.html