How can i add year to a date and month value

Seven Stars

How can i add year to a date and month value

Hello,

 

kindly suggest i am having a column where my input looks like 7-Jan but i need output as 7/1/2019(current year),how can i achieve this.

 

Regards,

Meena


Accepted Solutions
Highlighted
Forteen Stars

Re: How can i add year to a date and month value

@muralam,i will suggest you to create a new filed in tmap by using var as a sting with -2019 and concatenate the source field with variable field and then convert to sting to data.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: How can i add year to a date and month value

Hi @muralam ,

If the answer has helped you,could you please mark the topic as resolved? 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

All Replies
Four Stars

Re: How can i add year to a date and month value

Please try like this :

 

 select to_char(to_date('07-Jan' || '-' || extract(year from sysdate),'DD-MON-YYYY'),'DD/MM/YYYY') from dual ;

Highlighted
Forteen Stars

Re: How can i add year to a date and month value

@muralam,i will suggest you to create a new filed in tmap by using var as a sting with -2019 and concatenate the source field with variable field and then convert to sting to data.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: How can i add year to a date and month value

Hi @muralam ,

If the answer has helped you,could you please mark the topic as resolved? 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download