Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
i was trying to convert a date(End Date) column to numeric,
this is the expression i wrote down:
num(MonthEnd(MakeDate(Year(Date#(myear,'YYYY')),Month(Date#(mymonth,'MMMM'))))) as EndDate
End Result: 42400.9939292 .
Problem: how to get rid of the .9939292?
Rgds
Jim
Try like this
floor(num(MonthEnd(MakeDate(Year(Date#(myear,'YYYY')),Month(Date#(mymonth,'MMMM')))))) as EndDate
Try like this
floor(num(MonthEnd(MakeDate(Year(Date#(myear,'YYYY')),Month(Date#(mymonth,'MMMM')))))) as EndDate
oh... floor......
thanks bro Avin
The num() is redundant if you are using floor. It is only a format instruction so it makes no sense inside a calculation.
This (much simpler) expression should work:
=Floor(Date#(mYear & mymonth, 'YYYYMMMM'))
Thank Jonathan,
but i need to create a end date field. So, i took out the 'num', now is as below:
floor(MonthEnd(MakeDate(Year(Date#(MyYear,'YYYY')),Month(Date#(MyMonth,'MMMM'))))) as EndDate?
How simpler can it be now ?
Rgds
Jim