LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Date Analysis help

    Employee
    Posted 02-25-2013 12:03

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Cindy

    I am trying to solve a problem related to dates.

    For example, I have a bill date of 05/19/2012. I have an issue that has existed for 3 months, and was discovered on this bill date.

    I need to derive the previous 3 bill dates from the info I have. The answer, in this example would be 04/19/2012, 03/19/2012 and
    02/19/2012. Is there a way to take that single instance of date + number of months, and produce the corresponding dates for each incident?

    Thanks,

    Cindy


  • 2.  RE: Date Analysis help

    Employee
    Posted 02-25-2013 13:22

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    If you have a field "BillDate" that is the DATE data type, then you can simply use

    priormonth = BillDate.dateAdjust(-3,"months")

    You just have to be very if the billdate is on the days of 29,30 or 31.. that will be problems for when you try to backup to February.


  • 3.  RE: Date Analysis help

    Employee
    Posted 02-26-2013 07:03

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: xathras

    Cindy if you need some help on how to cater for calendar days over 29,30 or 31 let me know. I recently had to write some code to handle these scenarios for a project.

    Wayne