【发布时间】:2019-03-20 18:33:06
【问题描述】:
我的实际要求是,
这是我们在 .txt 文件中的输入,
下面的行包含 (Emp ID, Date, HH:MM:SS (即时间), Status, Site number, Reader number
123,"20/02/2019",00:00:50,IN,23,1
在上面,我必须将 123 作为 Emp ID,并将其分配给一个名为 tv_emp_id 的变量。
then, have to take date and HH:MM ("20/02/2019",02:30) and convert it into IST date & time (21-02-2019,14:00)), then put date (21-02-2019 format) alone in one variable called tv_date and HHMM in another variable called tv_time (14:00 it will be 1400) by Oracle query.
Finally required it with, tv_emp_id= 123;
tv_date = 21-02-2019
tv_time = 1400
请帮我解决。
谢谢
【问题讨论】:
-
请编辑您的问题以包含示例数据 - 特别是起始数据类型 - 和结果。
-
为什么是 12:29 而不是 12:30?这些是日期还是时间戳?
-
什么是时区 CST 和 IST?看看
SELECT TZABBREV, TZ_OFFSET(TZNAME), TZNAME FROM V$TIMEZONE_NAMES WHERE TZABBREV in ('CST', 'IST')