简体   繁体   English

我应该如何格式化我的字符串以通过 TIBCO BW6 将其传递到我的数据库?

[英]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.

相关问题 如何通过 formbuilder 将日期存储到我的数据库中? - How can I store a date into my database via formbuilder? 如何将日期更改为这种格式? - How can I change my date to this format? 如何将 5 位序列日期格式的字符串值从单元格获取到我的脚本中? - How do I get a string value of the 5 digit serial date format from a cell into my script? 从数据库绑定到MVC控件后,如何配置JavaScript函数将日期转换为dd / MMM / yyyy格式? - How would I configure my javascript function to convert date to dd/MMM/yyyy format upon binding from database to an mvc control? Tibco Businessworks日期格式 - Tibco Businessworks Date Format 通过ajax将当前日期发送到我的.net处理程序,如何传递安全日期? - Sending the current date via ajax to my .net handler, how to pass a safe date? 我应该如何在不暂停 OpenCv 屏幕的情况下延迟我的代码? - How should I delay my code without pausing my OpenCv screen? 如何使格式与我的时间数据匹配? - How do I make the format match my time data? 如何在日期时间模块中格式化我的 output? - How do I format my output in the datetime module? 如何在php中格式化日期以查询新的Date()格式? - how can I format my date in php to have the query new Date() format?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM