Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Modifing date

Hi all,

I have a field from Database and it contains date in (MM-DD-YYYY) format

I need to update the year part of it.(Cannot update in Database due to some constraints)

eg.

I have 2/24/2010 and i want it to be 2/24/2012, ie adding 2 years only.

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Load

          AddYears(DateField, 2) as NewDate

View solution in original post

2 Replies
tresesco
MVP
MVP

Load

          AddYears(DateField, 2) as NewDate

jyothish8807
Master II
Master II

Hi Deepak,

You can try like this also in script:

load

date(AddMonths(min([Date]),24),'MM-DD-YYYY') as New Date

Regards

KC

Best Regards,
KC