Forum Discussion
Strange DATE Function Behaviour
Hi FreemanZ , thanks for the reply.
As I explained in the original post, I've already tested all 3 arguments seperately to ensure they work. As you can see here:
Which returns:
So DAY definitely accepts expresions.
Thanks for your suggestion, the column I was building was for a different reason which I have since resolved, I'm just looking for an explanation as to why DATE doesn't like the 3 whole number arguments being passed to it.
In case MonthofYear =1, could it be an issue?
try to change the month part to :
IF(
[MonthofYear ]=1,
12,
[MonthofYear ]-1
)
- smokeyjoe033 years agoFrequent Visitor
FreemanZ thanks for trying to help but again, I've troubleshot that as I explained in the original post.
All three of those arguments work independantly. I've confimred this by creating a column using the YEAR, MONTH and DAY functions individually.
I've also used them one at a time and two at a time in conjunction with hard coded values (as below)The only time there is an error is when the DAY function is used for an argument, but that function works independatnly to return a who;e number (which is all DATE requires)
- FreemanZ3 years agoSuper User
i like you way of learning. I followed your way and tried the following:
you see, if there is for the first month of the Date Column (as there is no previous month), so BLANK is returned. And DATE can't take BLANK as its argument, so come the error you see.