Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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