Wouldn't the calculation of 32 days cause it to possibly jump over a month? ie
if the ticket is created on March 31 (or even March 30) it would calcuate a
date in May.
Rather than try to play with the days - could we do something like this?
Set Fields actions (in Filter or Active Link)
Action 1: $ztmp datetime field$ = DATEADD("mm", 1, $DATE$)
Action 2: $ztmp datetime field$ = MONTH($ztmp datetime field$) + "/1/" +
YEAR($ztmp datetime field)
Action 3: $ztmp datetime field$ = $ztmp datetime field$ - 1
----- Original Message -----
From: "Frederick W Grooms" <[email protected]>
To: [email protected]
Sent: Wednesday, May 7, 2014 11:35:12 AM
Subject: Re: Set Month End Date
This is the way I have done it in the past (Note: I am using US date format so
convert as needed)
Set Fields actions (in Filter or Active Link)
Action 1: $ztmp string field$ = MONTH($DATE$) + "/1/" + YEAR($DATE)
Action 2: $ztmp datetime field$ = $ztmp string field$
Action 3: $ztmp datetime field$ = $ztmp datetime field$ + (32 * 86400)
Action 4: $ztmp string field$ = MONTH($ztmp datetime field$) + "/1/" +
YEAR($ztmp datetime field)
Action 5: $ztmp datetime field$ = $ztmp string field$
Action 6: $ztmp datetime field$ = $ztmp datetime field$ - 1
At this point the display only datetime field has 11:59:59 PM of the last day
of the month
I broke the example out into individual set fields actions so you can see
exactly what is happening. Here is what each action is doing:
Action 1: Create a string of the first day of the current month
Action 2: Put the string into a date field
Action 3: Add enough days to make the temp field the next month
Action 4: Create a string of the first day of the month of the temp date
field
Action 5: Put the string into a date field
Action 6: Subtract 1 second from the temporary date field to get the last
day of the previous month
Fred
-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[email protected]] On Behalf Of Terje Moglestue
Sent: Wednesday, May 07, 2014 7:37 AM
To: [email protected]
Subject: Re: Set Month End Date
**
Karthick,
It is years since I have done this type of calculations.
In your example I would find the first day of the next month and then just take
minus one day. The outcome would the last day of the month you are in.
~
Terje
-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[email protected]] On Behalf Of Karthick S
Sent: Wednesday, May 07, 2014 8:50 AM
To: [email protected]
Subject: Set Month End Date
**
I need to Set a Month End Date in a field Called Due Date. Please find the
below.
Example: Ticket created Date is 7/05/2014 12:00:00 AM and the Due Date should
have 31/05/2014 11:59:59 PM. it should automatically calculate or populate the
Month End Date in Due Date field.
I have used this condition "((((($DATE$ + 43200) + (86400 * 31)) - (86400 *
DAY((($DATE$ + 43200) + (31 * 86400))))) - (3600 * HOUR((($DATE$ + 43200) + (31
* 86400))))) + (DAY($DATE$) * 86400)) - 1", Which given me the Due Date as
"7/06/2014 11:59:00 PM".
Can any one help me on this, Please.
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"