简体   繁体   中英

How should I format my string to pass it to my database via TIBCO BW6?

I'm new to 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'

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. When I match the input, the right pattern for matching my string in datetime is pattern 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.

Something like this (for ORACLE):

insert into table_name 
(my_date_field)
values (TO_DATE('2022/01/23 11:25:44', 'yyyy/mm/dd hh24:mi:ss'));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM