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: selecting records in date range

selecting records in date range 2 years 7 months ago #2344

  • Andrew Wojciak
  • Andrew Wojciak's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
Hi,
I have pipe delimited .txt file where dates are in ISO format YYYY-MM-DD.
In .txt output (WRITE) I want only records with dates = TODAY - 7 + 30 days. TODAY must auto-change daily. Does someone know how to do it easily? Sample file is attached.
Thank you,
AW
Attachments:

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

selecting records in date range 2 years 7 months ago #2345

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 274
Hi Andrew,

You need the power of flexible Parameters :)

First you have to define your Filter condition. For this we need two Parameters $MINDATE$ and $MAXDATE$. These Parameters can be set with the Set Parameter Heater . The current Date retrieved the Now Heater . This value you have to modify with the DateAdd Heater , one time +30 days and one time -7 days. Nevertheless you have to set this values to an ISO Date. This can be done with the String Format Heater .

Now we got two dynamical Parameters $MINDATE$ and $MAXDATE. This we just have to add into an IF-THEN-ELSE condition to filter the not needed CSV records.

I’ve made a simple example, please have a look to the attachment.

CSV date range filter condition


CSV ISO date format 1


CSV ISO date format 2


File Attachment:

File Name: csv-date-range-filter-condition.zip
File Size: 3 KB
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.
Last Edit: by FlowHeater-Team.

selecting records in date range 2 years 7 months ago #2346

  • Andrew Wojciak
  • Andrew Wojciak's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
Thank you, Robert.
Great solution and works perfectly.
AW

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

  • Page:
  • 1
Moderators: FlowHeater-Team
Time to create page: 0.947 seconds