Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Load

          AddYears(DateField, 2) as NewDate

View solution in original post

2 Replies
tresB
Champion III
Champion III

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