[英]How should I format my string to pass it to my database via TIBCO BW6?
I'm new to TIBCO BW6.我是 TIBCO BW6 的新手。 This is my scenario.这是我的场景。 I have a.csv file, and one of my columns is a string in this format: '31/08/2021 15:18:00'我有一个.csv 文件,我的列之一是以下格式的字符串:'31/08/2021 15:18:00'
I created a process that reads my file and inserts a new row into my database.我创建了一个进程来读取我的文件并将新行插入到我的数据库中。 I have a problem with the date.我的日期有问题。
In my palette JDBC Update, the date is a timestamp.在我的调色板 JDBC 更新中,日期是时间戳。 When I match the input, the right pattern for matching my string in datetime is pattern yyyy-mm-dd hh:mm:ss.当我匹配输入时,在日期时间匹配我的字符串的正确模式是模式 yyyy-mm-dd hh:mm:ss。
To do this kind of thing the best solution is generally to use the SQL database formatting functions in your SQL query.要做到这一点,最好的解决方案通常是在 SQL 查询中使用 SQL 数据库格式化函数。
Something like this (for ORACLE):像这样的东西(对于 ORACLE):
insert into table_name
(my_date_field)
values (TO_DATE('2022/01/23 11:25:44', 'yyyy/mm/dd hh24:mi:ss'));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.