Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Problem with data in formula expression step

$
0
0
Hi,

I'm a new user of PDI and I have a problem when I try to change the date value to another date value using a formula expression step.

I used the formula:

IF(ISBLANK([PHRENIC1]);[PHRENIC1];IF(YEAR([PHRENIC1])=YEAR(TODAY());[PHRENIC1];IF(DAY([PHRENIC1])=1;DATE(YEAR([PHRENIC1]);MONTH([PHRENIC1]);15);[PHRENIC1])))

to change the day 01 to day 15 on dates stored in field PHRENIC1.

I used the same expression in the same step to another field and it works, but to field PHRENIC1 appear the preview error:

Row Preview - ERROR(version 4.4.0-stable, build 17588 from 2012-11-21 ...) : PHRENIC1_2 Date: There was a data type error: the data type of java.lang.String object [2003-11-15] does not correspond to value meta [Date]

PHRENIC1_2 is the new field where the result of the formula will be stored. The step does not give error, but the field PHRENIC1_2 is empty.

I checked the Excell and all step before the formula step and the data type of PHRENIC1 is date. I do not know why this does not work. Anybody has some idea? Please, I will really appreciate any help.

Val_Qc

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>