Question

Using Tester Transformer to query Yesterday (Datetime field)

  • 4 October 2017
  • 2 replies
  • 22 views

Badge

I am using the following workflow to pass and INSERT in writer all records with datetime "yesterday". Rest all records will be UPDATE based on an ID field. This workflow will be scheduled to run everyday. I am sure my value field to calculate yesterday is not correct! Any guidance will be helpful.


2 replies

Badge

Hi @schatt15 

if Lst_Updt_Dt_Tester is the date (or datetime) that needs to be yesterday, the Tester/TestFilter condition should be:

@DateTimeFormat(Lst_Updt_Dt_Tester,%Y%m%d) = @DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P1D),%Y%m%d)
Badge

@LenaAtSafe, thank you. That worked.

Reply