cancel
Showing results for 
Search instead for 
Did you mean: 

system Date population

Former Member
0 Kudos

Hi,

Iam using jdbc adapter on receiver side to insert values into the database table.In the table there is a field with date format.In my mapping i want to populate this field with the system date so that when I run the scenario,this field has to be inserted with system date at the time of running.

Can anybody please tell me how i have to map that field.

Thanks & Regards,

Radhika

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member267355
Active Participant
0 Kudos

Hi,

You can get the current date from standard date functions in mapping.

Date-> currentDate is the function.

Regards,

Sakthi

former_member192892
Active Contributor
0 Kudos

Hi radhika,

there are various date functions in mapping...

You can use the current date f(n)

former_member192892
Active Contributor
0 Kudos

Also radhika, you can give the value for the output inserted field to be getdate().

This is an SQL f(N) which will insert the current date into your table

Former Member
0 Kudos

Thankyou Varun,

I think to populate current time also we can go for time functions in mapping...,am I right?

Thanks & Regards,

Radhika.

former_member192892
Active Contributor
0 Kudos

Ya Radhika,

The currentDate function under Date functions shud do it...

Also the problem wid d above is dat it'll take the XI server's time and not of your SQL server's time..

If you have a scenario where there cud be a time zone diff between ur XI server location and SQL server locn... Just in case

henrique_pinto
Active Contributor
0 Kudos

The currentDate function will give you both current Date (with parameter = MM/dd/yyyy, for example), and time (with parameter HH:mm:ss, for example).

Regards,

Henrique.