Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Does the sdbimprt Import tool support importing dates in DD-MON-YY format?

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "does the sdbimprt import tool support importing the date in DD-MON-YY format?" in the daily operation, I believe that many people have doubts on the question that the sdbimprt import tool supports importing the date in DD-MON-YY format. Xiaobian consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the question of "does the sdbimprt import tool support importing dates in DD-MON-YY format?" Next, please follow the editor to study!

[detailed description of the problem]

Can I use sdbimprt to import dates in "DD-MON-YY" format such as "03-JAN-16"?

[solution]

1. Currently (v3.0.1), SequoiaDB's import tool does not support the date format of timestampfmt= "DD-MON-YY".

two。 Under linux, you can use the sed tool to change the data in the "DD-MON-YY" format in the import file file (e.g.'/ opt/impfile.csv') to support the imported "DD-MM-YYYY" format. For example:

Replace 'JAN-' with' 01-20mm, and the command is: sed-I 's/JAN-/01-20max g' / opt/impfile.csv

Replace 'FEB-' with' 02-20, and the command is: sed-I 's/FEB-/02-20 Universe g' / opt/impfile.csv

……

Replace 'DEC-' with' 12-20 DEC-', and the command is: sed-I 's/DEC-/12-20 Universe g' / opt/impfile.csv

Note: a total of 12 months are replaced here, and the years after replacement are all 20xx years.

3. Import the replaced file into the database again.

Sdbimprt-hosts localhost:11810-type csv-file imprtfile.csv-c foo-l bar-fields' time1 timestamp'-timestampfmt= "DD-MM-YYYY"

At this point, the study on "does the sdbimprt import tool support importing dates in DD-MON-YY format?" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report