on 03-20-2006 10:40 PM
Hi all,
I have the following requirement:
I have a date field 0calday and the user would like to add a specific no.of days to it, like for example 10 or 15 days. Then we use this computed date field in calculations in the query. Could you please help and let me know how we can no.of days to a date field? And also how we can compute no.of days between two date fields?
Regards,
Ashmith Roy
Hi Ashmith,
When the user enters both date and no. of days, and if you want to calculate no of days from the user entered date I think you can go for an exit where you can use the available function module which calculates the no of days from starting of the month for the given date. Then you can add up the days entered by the user and use another available function module which converts it to the dat format again based on the given days and the old date. I don't remember the function module names but i am sur ethey are available.
If the above thing is made possible then I think getting no of days between two dates is not a problem. Well i hope this will help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Avr,
I would like to know whether it is possibele to create a user entry variable, like you say, for the number of days and add this to a date field to get a second date that is stored dynamically. I am going to use this second date field in another computation for no. of days which a different date field.
For example I have a date field ZDATE with value 3/21/2006. I want to add 5 days and get and store that value in a new field ZDATE2. I am going to use this ZDATE2 in some other computations.
Please help.
Ashmith Roy
Hi AVR,
I guess I am still missing something here. See I only have one date field in the data target ZDATE. I need to add another new 'calculated' date field to the query. Is this possible? It is not a KF computation but adding a Characteristic to the query. Should I go the Virtual characteristic route? Please advise.
Thanks,
Ashmith Roy
For your first question, adding a fixed number of days can be acheived by using variable offsets.
For your second question, difference between to dates can be computed by using a formula. This formula contains difference of two formula variables on the two date fields using replacement path.
Let me know if you need more info, I can walk you through the process.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Venky,
The requirement is that if 0calday has a value, say, 03/20/2006 then the user would add 10 or 15 days to it to get a new field, say, zdate with the values 03/30/2006 or 04/04/2006. Could you please elaborate how we can do this using variable offsets?
I found another topic in this forum detailing how to calculate the no.of days between two dates.
thanks,
Ashmith Roy
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.