Dynamic data import / export

datenbank

simply more productive
Up to 100,000 records can be processed with the freeware version!
Welcome, Guest
Username: Password: Remember me
Welcome to the FlowHeater support forum.

Questions about using FlowHeater are answered here.
  • Page:
  • 1

TOPIC: Transposing an Excel date to a MySQL long

Transposing an Excel date to a MySQL long 6 years 6 months ago #2069

  • FlowHeater-Team
  • FlowHeater-Team's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 263
Translated submission in the German forum. You can read the original entry here .

Hi,

I want to import data from an Excel workbook into a MySQL database table.

This means an Excel date field with the format "dd.mm.yyyy" must be input to a MySQL long integer with the format "yyyymmdd".

Is there an easy way to do this?

Thanks in advance,
Alfred Schmidt

Please Log in or Create an account to join the conversation.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Re:Transposing an Excel date to a MySQL long 6 years 6 months ago #2070

  • FlowHeater-Team
  • FlowHeater-Team's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 263
Hi Alfred,

You can do that with the help of the Format Heater and the built-in Adapter data type conversion .
  1. If your Excel field is defined as a date, you do not need to do anything further on the READ side, so proceed with step 2. However, if the date field is defined as a string, you have to ensure the Adapter format settings comply with the actual date format in the Excel file. Normally you need no special settings here either, because FlowHeater uses the standard locale settings of the computer when creating a new Definition. For a German setup this is already set to dd.mm.yyyy.
  2. Now you have to first convert the date into a string. To do this you use the Format Heater with settings as in the screenshot. The Format Heater now converts the date into a string e.g. 20101005.
  3. You simply connect the output string so formatted to the MySQL long field . At this point the data type conversion of FlowHeater cuts in and the value is automatically converted from a string to a number.

To make it easy to visualize we have written a brief example for you, see the attachment.

Attachment excel_date_mysql_long.zip not found

Attachments:

Please Log in or Create an account to join the conversation.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
  • Page:
  • 1
Moderators: FlowHeater-Team
Time to create page: 0.083 seconds