Hi Techies,
I have a date field and it has only month / day. For example,
Date Field
6/30
7/1
7/2
7/3
7/4
7/5
How do I add year to make it
6/30/2015
7/1/2015
7/2/2015
7/3/2015
7/4/2015
7/5/2015
in order to link it to master calendar.
Note: These fields will be updated daily. So when the year reaches 2016, dynamically 2015 should be changed to 2016.
How do I Achieve it ?
May be this:
Date(Date#([Date Field] & '/' & Year(Today()), 'MM/DD/YYYY'), 'MM/DD/YYYY') as [Date Field]
May be this:
Date(Date#([Date Field] & '/' & Year(Today()), 'MM/DD/YYYY'), 'MM/DD/YYYY') as [Date Field]
Awesome Sunny. Thanks.
Hi Sunny, I have a doubt. We are using year(today()), suppose if year reaches 2016, all the entries in date field would have 2016 , right?
But I need like,
12/29/2015
12/30/2015
12/31/2015
1/1/2016
1/2/2016
1/3/2016
How to achieve this, Thanks...
Don't you have a year field in your database? Cause what you are asking is going to be very difficult, if not impossible
Yes, it will take the current year and all your dates changed to year 2016.
You can also try like this
MakeDate(Year(Today()), SubField(DateFieldName, '/', 1), SubField(DateFieldName, '/', 2)) AS Date
Regards,
Jagan.