Hi Misi,

Your calculation works fine in our Dev environment, but when i use the same
date calculation in production system it gives this date '01/01/1970
11:00:31 AM'.


On Tue, Sep 2, 2014 at 2:50 AM, Misi Mladoniczky <m...@rrr.se> wrote:

> Hi,
>
> Could you please describe what you want to accomplish?
>
> If you want to get the last second of the current month, I would do
> somethinglike:
>
> DATEADD("month", 1, DATEADD("day", 1-DAY($DATE$), $DATE$)) - 1
>
> And in two steps:
>
> Get the first second of the current month:
> firstsecond = DATEADD("day", 1-DAY($DATE$), $DATE$)
>
> Get the last second based on the first second of the month
> lastsecond = DATEADD("month", 1, $firstsecond$) - 1
>
>         Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011)
>
> Ask the Remedy Licensing Experts (Best R.O.I. Award at WWRUG10/11/12/13):
> * RRR|License - Not enough Remedy licenses? Save money by optimizing.
> * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
> Find these products, and many free tools and utilities, at http://rrr.se.
>
> > Hi All,
> >
> > Our remedy version is 7.1, Server - Windows 2003 R2 Server, Datebase - MS
> > SQL 2005.
> >
> >
> > *In Dev System:*
> > I used the below date function in one of the workflow, which worked fine
> > and the result were as expected. I got the date is '30/09/2014 11:59:59
> PM'.
> >
> > DATEADD( "day", ( - DATENUM( "day", DATEADD( "month", 1, $DATE$))),
> > DATEADD( "month", 1, $DATE$)) + (86400 - 1)
> >
> >
> > *In Production:*
> > When i used the same Date function in Production system, it give the Date
> > '02/01/1970 11:00:30 AM'
> >
> > The issue looks very strange and i am unable to figure it out, please
> help
> > me on this.
> >
> > *Thanks and Regards,*
> > *Karthick S*
> >
> >
> _______________________________________________________________________________
> > 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"
>



-- 


*Thanks and Regards,*
*Karthick S*

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to