Namik48075
asked on
Calculated Date Field in Dw
How can I do the calculated date in the dw with Computed field.
I have a Computed Field where I calculate the number of months the item expire in.
Now, based on that I need to report the month when the part expire.
Ex.
Remaining Hours 400
Remaining Months 400/180 ( 180 часl 6;в в месn 3;ц харk 6;к& #1086;
 76;е д)= 2
Expire Months 2
Expire Date needed Todays date + 2 months = August, 2006...
How to do the calculations for the date.
In SQL I could do the Dateadd, but how do I do that in Dw.
thanks
I have a Computed Field where I calculate the number of months the item expire in.
Now, based on that I need to report the month when the part expire.
Ex.
Remaining Hours 400
Remaining Months 400/180 ( 180 часl
Expire Months 2
Expire Date needed Todays date + 2 months = August, 2006...
How to do the calculations for the date.
In SQL I could do the Dateadd, but how do I do that in Dw.
thanks
Look at the RelativeDate Function.
ASKER
Thank you,
Is the relative date only works with days, is it possible something like thins for months?
Is the relative date only works with days, is it possible something like thins for months?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can try this
If((400/180)+2>12,13 - (400/180)+2, (400/180)+2) make a compute filed with the name c_month
The creat another computete file like this
If(c_month=1,’Jan’,if(c_mo nth=2,’Feb ’, if(c_month=3,’March’, if(c_month=4,’April’, if(c_month=5,’May’, if(c_month=6,’june’, if(c_month=7,’July’, if(c_month=8,’August’, if(c_month=9,’Sep’, if(c_month=10,’OCT’, if(c_month=11,’Nov’, if(c_month=12,’DEC’,)))))) ))))))
If((400/180)+2>12,13 - (400/180)+2, (400/180)+2) make a compute filed with the name c_month
The creat another computete file like this
If(c_month=1,’Jan’,if(c_mo
sorry for mistyping
you can try this
If((400/180)+2>12,13 - (400/180)+2, (400/180)+2) make a compute filed with the name c_month and hide it
Then creat another computed filed like this
If(c_month=1,’Jan’,if(c_mo nth=2,’Feb ’, if(c_month=3,’March’, if(c_month=4,’April’, if(c_month=5,’May’, if(c_month=6,’june’, if(c_month=7,’July’, if(c_month=8,’August’, if(c_month=9,’Sep’, if(c_month=10,’OCT’, if(c_month=11,’Nov’, if(c_month=12,’DEC’,)))))) ))))))
you can try this
If((400/180)+2>12,13 - (400/180)+2, (400/180)+2) make a compute filed with the name c_month and hide it
Then creat another computed filed like this
If(c_month=1,’Jan’,if(c_mo