Dynamic data import / export

datenbank

simply more productive
Up to 10,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.

TOPIC: Transposing an Excel date to a MySQL long

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

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Posts: 240
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
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.
The administrator has disabled public write access.

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

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Posts: 240
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:
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.
The administrator has disabled public write access.
Moderators: FlowHeater-Team
Time to create page: 0.073 seconds