Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can Some one help me here, My Question is i have a Date Field in MM\DD\YYYY Format.
in that values i have as below
Example 12\03\2022
08\07\2019
03\24\2018
but i want to Change only Year from that Date field to current year
like below
12\03\2017
08\07\2017
03\24\2017
How can i Achieve it , Some one help me here please.
Thanks,
Try using SetDateYear() function
LOAD SetDateYear(DateField, 2017) as DateField
You can use the date() function:
date(YourFieldName, 'MM\DD\YYYY')
Hope this helps
Or this:
LOAD SetDateYear(DateField, Year(Today())) as DateField
Thank You So much . It Works. 🙂
Thank You For all 🙂
@sunny_talwar Hi - I have date as 31-Jan-99
which is 12/31/1999.How can I change this to show as 12/31/2999 ?This column has multiple dates with diff. years, but for this I want to show as 2999.
@BI_Dev Something like this
=Date(SetDateYear(Date#('31-Dec-99', 'DD-MMM-YY'), 2999))
Replace the hard coded value with your field.
Awesome - Thank you.