Skip to Content
author's profile photo Former Member
Former Member

Add Days to a Date field

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2006 at 10:44 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 21, 2006 at 05:24 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Check if you can do it without touching he data target. I think you need not store the calculated date anywhere but get data based on calculated date. It can be made possible in the exit and by using that properly. try and come with details. Good Luck

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.