[tJavaRow] Retrieve the current date

One Star

[tJavaRow] Retrieve the current date

Hello everybody,
I would like retrieve the current date when I run my job, I have in my datawarehouse a special field (date format) for that. I tried with tJavaRow like that :
----------------------------------
import java.util.date;
output_row.UPD_DATE = new Date ("yyyy/MM/dd");
----------------------------------
In the code part my import java.util.date cannot be resolved to a type
and for the other line i have "the constructor date(string) is deprecated

So i would like to know if I can retrieve the current date like that or if i should use an other method etc...
Thanks for all help.

PS : I'm not Accustomed to speak english so if If there are english errors i'm very sorry
One Star

Re: [tJavaRow] Retrieve the current date

Hi,
you can use (without "import java.util.date;") :
output_row.UPD_DATE = TalendDate.parseDate("yyyy/MM/dd",TalendDate.getDate("CCYY/MM/DD"));
--
R
One Star

Re: [tJavaRow] Retrieve the current date

thank you very mutch, it's perfect
One Star

Re: [tJavaRow] Retrieve the current date

can we, when we run the job, make a distinction between insert date and update date?