Hi,

I guessed as much, but a calculation should be made to work in any
environment. With the exception of a different timezone setting in this case.

Your underlying problem still seems to be a char-conversion of your timestamp,
and it would be nice to know the root cause.

What datatype did your field have?

        Best Regards - Misi, RRR AB, http://rrr.se

> Hi Misi,
>
> Thanks for the mail, issue got fixed. in Server Language setting was US
> format and after changing that to Australia and reboot the Remedy server.
> it worked just fine.
> once again thanks for the date calculation.
>
>
> On Tue, Sep 2, 2014 at 2:59 PM, Misi Mladoniczky <[email protected]> wrote:
>
>> Hi,
>>
>> Is your target field a char-field?
>>
>> Try splitting things up to find where it goes wrong:
>>
>> tmpint1 = $DATE$
>> tmpint2 = DATEADD("day", 1-DAY($tmpint1$), $tmpint1$)
>> tmpdate = DATEADD("month", 1, $tmpint2$) - 1
>>
>>         Best Regards - Misi, RRR AB, http://rrr.se
>>
>> > 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 <[email protected]> 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"
>> >
>>
>>
>> _______________________________________________________________________________
>> 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"
>

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

Reply via email to