Re: Adding days to a Date field in a qualification doesn't work

2008-10-29 Thread Kemes, Lisa
Mark,

I'm having the same problems with Date fields for some time now (these
are Date only fields, not Date/Time fields).  I think it DOES have
something to do with the quotation marks.

When I do this:

'mydate'  6/21/2008  it works,

But when I do:

'mydate'   ($DATE$ - (((60 * 60) * 24) * 120))

It doesn't work.

I've tried 'mydate'   ($DATE$ - (((60 * 60) * 24) * 120)) as well. 
I've tried 'mydate'   ($TIMESTAMP$ - (((60 * 60) * 24) * 120)) as well.


I like LJ's suggestion, but the question is, where does the
ztmp_datefield field go if you are doing a escalation?  On every single
record?  (I would like to delete all records that are more than 120 days
old) 

note to self: NEVER use date fields.  ALWAYS use Date/Time fields and
make the display type Date if you want a date field

If 'mydate' was a date/time field (whether it be displayed as date or
date/time) this query would work just fine

Lisa

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 6:56 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 An easy way to do this is to use the multipliers. You will also need 
 to use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight 
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right
UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy 
 ARS was built before there was a Public Internet. Come to think of it,

 there may have been 4 clients at one time, but there may not have been

 one for IBM OS/2.

 When you do it this way, you can substitute a $variable or a number 
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE field
the example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum
Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-29 Thread Michelle Lucero
Hi, Lisa:

I have had to deal with a similar conversion.

We have a Self-Service application that pushes entries into our Helpdesk 
form.  The field on the Self-Service form is Date/Time.  The field that 
this Self-Service date/time field is being pushed into is a DATE field.

So, I did the following:

I set a temp field with the input date, and then do a conversion.

Set Fields 1:  zTmpInteger = $InputDateTime$
Set Fields 2:  zTmpInteger = TRUNC(($zTmpInteger$ / 86400)) + 2440588

The new zTimpInteger is pushed into my Date only field into the Helpdesk 
form.

Note:  2440588 is the number of days between Jan 1, 4713 B.C. and Jan 1, 
1970.  It will always be the constant and will never change.

Hope this helps,
Michelle

This app is on ARS 6.3, P23using Mid-Tier 7.0.1 patch 04.



Kemes, Lisa [EMAIL PROTECTED] 
Sent by: Action Request System discussion list(ARSList) 
arslist@ARSLIST.ORG
10/29/2008 12:45 PM
Please respond to
arslist@ARSLIST.ORG


To
arslist@ARSLIST.ORG
cc

Subject
Re: Adding days to a Date field in a qualification doesn't work






Mark,

I'm having the same problems with Date fields for some time now (these
are Date only fields, not Date/Time fields).  I think it DOES have
something to do with the quotation marks.

When I do this:

'mydate'  6/21/2008  it works,

But when I do:

'mydate'   ($DATE$ - (((60 * 60) * 24) * 120))

It doesn't work.

I've tried 'mydate'   ($DATE$ - (((60 * 60) * 24) * 120)) as well. 
I've tried 'mydate'   ($TIMESTAMP$ - (((60 * 60) * 24) * 120)) as well.


I like LJ's suggestion, but the question is, where does the
ztmp_datefield field go if you are doing a escalation?  On every single
record?  (I would like to delete all records that are more than 120 days
old) 

note to self: NEVER use date fields.  ALWAYS use Date/Time fields and
make the display type Date if you want a date field

If 'mydate' was a date/time field (whether it be displayed as date or
date/time) this query would work just fine

Lisa

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 6:56 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 An easy way to do this is to use the multipliers. You will also need 
 to use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight 
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right
UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy 
 ARS was built before there was a Public Internet. Come to think of it,

 there may have been 4 clients at one time, but there may not have been

 one for IBM OS/2.

 When you do it this way, you can substitute a $variable or a number 
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE field
the example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum
Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are



==

Confidentiality Notice: The information contained in and transmitted with this 
communication is strictly confidential, is intended only for the use of the 
intended recipient, and is the property of Countrywide Financial Corporation or 
its affiliates and subsidiaries.  If you are not the intended recipient, you 
are hereby notified that any use of the information contained in or transmitted 
with the communication or dissemination, distribution, or copying of this 
communication is strictly prohibited by law.  If you have received this 
communication in error, please immediately return this communication to the 
sender and delete the original message and any copy of it in your possession.

==


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-29 Thread Opela, Gary L CTR USAF AFMC 72 CS/SCBAH
You could additionally push the value from the date/time field (integer)
into a plain character field. This will give the usable date format,
such as 10/27/2008 05:22:01AM. Then, you could do another set fields to
the Date Field that takes just the first 10 characters of what is in the
char field, and pushes that over to the date field. I'll bet that would
work as long as you are not performing any math, but I've never tried
it, so I'm not sure.

Gary.

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Michelle Lucero
Sent: Wednesday, October 29, 2008 1:30 PM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

** 
Hi, Lisa: 

I have had to deal with a similar conversion. 

We have a Self-Service application that pushes entries into our Helpdesk
form.  The field on the Self-Service form is Date/Time.  The field that
this Self-Service date/time field is being pushed into is a DATE field. 

So, I did the following: 

I set a temp field with the input date, and then do a conversion. 

Set Fields 1:  zTmpInteger = $InputDateTime$ 
Set Fields 2:  zTmpInteger = TRUNC(($zTmpInteger$ / 86400)) + 2440588 

The new zTimpInteger is pushed into my Date only field into the Helpdesk
form. 

Note:  2440588 is the number of days between Jan 1, 4713 B.C. and Jan 1,
1970.  It will always be the constant and will never change. 

Hope this helps, 
Michelle 

This app is on ARS 6.3, P23using Mid-Tier 7.0.1 patch 04. 



Kemes, Lisa [EMAIL PROTECTED] 
Sent by: Action Request System discussion list(ARSList)
arslist@ARSLIST.ORG 

10/29/2008 12:45 PM 
Please respond to
arslist@ARSLIST.ORG

To
arslist@ARSLIST.ORG 
cc
Subject
Re: Adding days to a Date field in a qualification doesn't work






Mark,

I'm having the same problems with Date fields for some time now (these
are Date only fields, not Date/Time fields).  I think it DOES have
something to do with the quotation marks.

When I do this:

'mydate'  6/21/2008  it works,

But when I do:

'mydate'   ($DATE$ - (((60 * 60) * 24) * 120))

It doesn't work.

I've tried 'mydate'   ($DATE$ - (((60 * 60) * 24) * 120)) as well. 
I've tried 'mydate'   ($TIMESTAMP$ - (((60 * 60) * 24) * 120)) as well.


I like LJ's suggestion, but the question is, where does the
ztmp_datefield field go if you are doing a escalation?  On every single
record?  (I would like to delete all records that are more than 120 days
old) 

note to self: NEVER use date fields.  ALWAYS use Date/Time fields and
make the display type Date if you want a date field

If 'mydate' was a date/time field (whether it be displayed as date or
date/time) this query would work just fine

Lisa

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 6:56 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 An easy way to do this is to use the multipliers. You will also need 
 to use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight 
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right
UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy 
 ARS was built before there was a Public Internet. Come to think of it,

 there may have been 4 clients at one time, but there may not have been

 one for IBM OS/2.

 When you do it this way, you can substitute a $variable or a number 
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE field
the example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum
Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are




==
Confidentiality Notice: The information contained in and transmitted
with this communication is strictly confidential, is intended only for
the use of the intended recipient, and is the property of Countrywide
Financial Corporation or its affiliates and subsidiaries. If you are not
the intended recipient, you are hereby notified that any use of the
information contained in or transmitted with the communication or
dissemination, distribution, or copying of this communication is
strictly prohibited by law. If you have received this communication in
error, please immediately return this communication to the sender and
delete the original 

Re: Adding days to a Date field in a qualification doesn't work

2008-10-29 Thread LJ Longwing
In this situation you would need the escalation to modify EVERY record, and
have a series of filters fire on modify that performed the remove on only
those records that matched 

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Kemes, Lisa
Sent: Wednesday, October 29, 2008 11:46 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

Mark,

I'm having the same problems with Date fields for some time now (these are
Date only fields, not Date/Time fields).  I think it DOES have something to
do with the quotation marks.

When I do this:

'mydate'  6/21/2008  it works,

But when I do:

'mydate'   ($DATE$ - (((60 * 60) * 24) * 120))

It doesn't work.

I've tried 'mydate'   ($DATE$ - (((60 * 60) * 24) * 120)) as well. 
I've tried 'mydate'   ($TIMESTAMP$ - (((60 * 60) * 24) * 120)) as well.


I like LJ's suggestion, but the question is, where does the ztmp_datefield
field go if you are doing a escalation?  On every single record?  (I would
like to delete all records that are more than 120 days
old) 

note to self: NEVER use date fields.  ALWAYS use Date/Time fields and make
the display type Date if you want a date field

If 'mydate' was a date/time field (whether it be displayed as date or
date/time) this query would work just fine

Lisa

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 6:56 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 An easy way to do this is to use the multipliers. You will also need 
 to use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight 
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right
UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy 
 ARS was built before there was a Public Internet. Come to think of it,

 there may have been 4 clients at one time, but there may not have been

 one for IBM OS/2.

 When you do it this way, you can substitute a $variable or a number 
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE field the
example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum
Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:
www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-29 Thread Kemes, Lisa
This is good advice, but none of my fields are Date/Time fields, they
are all Date Fields only.  
 

Lisa 

 



From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Michelle Lucero
Sent: Wednesday, October 29, 2008 2:30 PM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work


** 
Hi, Lisa: 

I have had to deal with a similar conversion. 

We have a Self-Service application that pushes entries into our Helpdesk
form.  The field on the Self-Service form is Date/Time.  The field that
this Self-Service date/time field is being pushed into is a DATE field. 

So, I did the following: 

I set a temp field with the input date, and then do a conversion. 

Set Fields 1:  zTmpInteger = $InputDateTime$ 
Set Fields 2:  zTmpInteger = TRUNC(($zTmpInteger$ / 86400)) + 2440588 

The new zTimpInteger is pushed into my Date only field into the Helpdesk
form. 

Note:  2440588 is the number of days between Jan 1, 4713 B.C. and Jan 1,
1970.  It will always be the constant and will never change. 

Hope this helps, 
Michelle 

This app is on ARS 6.3, P23using Mid-Tier 7.0.1 patch 04. 



Kemes, Lisa [EMAIL PROTECTED] 
Sent by: Action Request System discussion list(ARSList)
arslist@ARSLIST.ORG 

10/29/2008 12:45 PM 
Please respond to
arslist@ARSLIST.ORG


To
arslist@ARSLIST.ORG 
cc
Subject
Re: Adding days to a Date field in a qualification doesn't work






Mark,

I'm having the same problems with Date fields for some time now (these
are Date only fields, not Date/Time fields).  I think it DOES have
something to do with the quotation marks.

When I do this:

'mydate'  6/21/2008  it works,

But when I do:

'mydate'   ($DATE$ - (((60 * 60) * 24) * 120))

It doesn't work.

I've tried 'mydate'   ($DATE$ - (((60 * 60) * 24) * 120)) as well. 
I've tried 'mydate'   ($TIMESTAMP$ - (((60 * 60) * 24) * 120)) as well.


I like LJ's suggestion, but the question is, where does the
ztmp_datefield field go if you are doing a escalation?  On every single
record?  (I would like to delete all records that are more than 120 days
old) 

note to self: NEVER use date fields.  ALWAYS use Date/Time fields and
make the display type Date if you want a date field

If 'mydate' was a date/time field (whether it be displayed as date or
date/time) this query would work just fine

Lisa

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 6:56 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 An easy way to do this is to use the multipliers. You will also need 
 to use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight 
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right
UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy 
 ARS was built before there was a Public Internet. Come to think of it,

 there may have been 4 clients at one time, but there may not have been

 one for IBM OS/2.

 When you do it this way, you can substitute a $variable or a number 
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE field
the example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum
Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are




==
Confidentiality Notice: The information contained in and transmitted
with this communication is strictly confidential, is intended only for
the use of the intended recipient, and is the property of Countrywide
Financial Corporation or its affiliates and subsidiaries. If you are not
the intended recipient, you are hereby notified that any use of the
information contained in or transmitted with the communication or
dissemination, distribution, or copying of this communication is
strictly prohibited by law. If you have received this communication in
error, please immediately return this communication to the sender and
delete the original message and any copy of it in your possession. 
==


__Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
html___

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org

Re: Adding days to a Date field in a qualification doesn't work

2008-10-29 Thread Grooms, Frederick W
You can create a form with only 1 record on it and have the escalation
fire against that form.

i.e.  Create a form ArchiveEscalationControl   
   Put a Date Only field on it ArchiveDate

Create an Escalation  Do Work that runs against
ArchiveEscalationControl
   Escalation does a Set fields to add 1 to ArchiveDate   
   Escalation could then do a Run-Process action   
  Application-Query-Delete-Entry Form to Clean Up ( 'Date
Modified' = $ArchiveDate$ )

Fred
 

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Kemes, Lisa
Sent: Wednesday, October 29, 2008 12:46 PM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

Mark,

I'm having the same problems with Date fields for some time now (these
are Date only fields, not Date/Time fields).  I think it DOES have
something to do with the quotation marks.

When I do this:

'mydate'  6/21/2008  it works,

But when I do:

'mydate'   ($DATE$ - (((60 * 60) * 24) * 120))

It doesn't work.

I've tried 'mydate'   ($DATE$ - (((60 * 60) * 24) * 120)) as well. 
I've tried 'mydate'   ($TIMESTAMP$ - (((60 * 60) * 24) * 120)) as well.


I like LJ's suggestion, but the question is, where does the
ztmp_datefield field go if you are doing a escalation?  On every single
record?  (I would like to delete all records that are more than 120 days
old) 

note to self: NEVER use date fields.  ALWAYS use Date/Time fields and
make the display type Date if you want a date field

If 'mydate' was a date/time field (whether it be displayed as date or
date/time) this query would work just fine

Lisa

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 6:56 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 An easy way to do this is to use the multipliers. You will also need 
 to use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight 
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right
UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy 
 ARS was built before there was a Public Internet. Come to think of it,

 there may have been 4 clients at one time, but there may not have been

 one for IBM OS/2.

 When you do it this way, you can substitute a $variable or a number 
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE field
the example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum
Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-29 Thread Shellman, David
I checked in the documentation and found that both $DATE$ and
$TIMESTAMP$ resolve to current date when used with a Date field (not to
be confused with a Date/Time field set to display as Date).  It appears
that the arithmetic is not being performed in the comparisons.

'my_date_field'  ($DATE$ - 120) and 'my_date_field'  ($DATE$ - 120)
is functioning the same as 'my_date_field'  $DATE$

Looking through documentation, I was not able to find examples of
Advanced Searches using a Date field with addition or subtraction.

I do know that setting a Date field with $DATE$ + X, one must use number
of days and not seconds to for the addition to work properly.

Has anyone asked Support if this is supposed work like
addition/subtraction with a Date/Time field?

Dave

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 6:56 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 An easy way to do this is to use the multipliers. You will also need
to
 use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right
UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy
ARS
 was built before there was a Public Internet. Come to think of it,
there
 may have been 4 clients at one time, but there may not have been one
for
 IBM OS/2.

 When you do it this way, you can substitute a $variable or a number
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE
field the example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-28 Thread Mark Milke
 I usually have to put the Date fields inside quotes when doing
 calculations

 'my_date_field'  ($DATE$ + 182)

I've tried that. It doesn't work.I've entered 28.10.2020 into my date
field, i.e. I'm saying in my AL RunIf qualification: 28.10.2020 
($DATE$ + 1), but the AL goes into else action. As this example
shows it doesn't really matter it ARS sees date as second, days, week
or even years. Year 2020 is so far in the future, that it should work
anyway, but it doesn't.

BTW, I'm on 6.3 Patch 24.

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-28 Thread Mark Milke
Hi Doug,

 'my_date_field'  ($DATE$ + 15724800)

I've tried that. It doesn't work.I've entered 28.10.2020 into my date
field, i.e. I'm saying in my AL RunIf qualification: 28.10.2020 
($DATE$ + 1), but the AL goes into else action. As this example shows
it doesn't really matter it ARS sees date as second, days, week or
even years. Year 2020 is so far in the future, that it should work
anyway, but it doesn't.

BTW, I'm on 6.3 Patch 24.


Thanks
Mark

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-28 Thread Mark Milke
Hi Gary,

 Yeah, I think that doug is on to something here. The $DATE$ keyword is
 referring to seconds, I believe, and thus you need to add six months
 worth of seconds. Note, that $DATE$ calculates to midnight that day, so
 if you need to calculate six months from now, then you will likely need
 to use $TIMESTAMP$. Using $DATE$ will give you 6 months from the
 beginning of the current day. Also, as a good note, I would suggest
 adding the parenthesis, although they should not be required.

I think it doesn't really matter, because it doesn't work in any of
the casese.
I've entered 28.10.2020 into my date field, i.e. I'm saying in my AL
RunIf qualification: 28.10.2020  ($DATE$ + 1), but the AL goes into
else action.

As this example shows it doesn't really matter it ARS sees date as
second, days, week or even years. Year 2020 is so far in the future,
that it should work anyway, but it doesn't.

BTW, I'm on 6.3 Patch 24.


Mark

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-28 Thread Mark Milke
 An easy way to do this is to use the multipliers. You will also need to
 use $TIMESTAMP$

 'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

 $TIMESTAMP$ returns the number of seconds elapsed since midnight
 Coordinated Universal Time (UTC) of January 1, 1970.

 Guess what platform Remedy ARS was first built upon? That's right UNIX.
 There used to be 3 clients. Anyone know what they were? Note: Remedy ARS
 was built before there was a Public Internet. Come to think of it, there
 may have been 4 clients at one time, but there may not have been one for
 IBM OS/2.

 When you do it this way, you can substitute a $variable or a number
 whenever you like.

I've tried that too, of course. When your my_date_field is a DATE
field the example you're showing will  n o t  work.
At least on my 6.3 patch 024 it just doesn't work.

Thanks anyway!
Mark

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-28 Thread Grooms, Frederick W
A couple of questions...

Is your field a Date/Time, Date Only, or Time Only field?

Since it is an AL have you tried using the 7.1 Client to see if it does
the same thing?

If your field is a Date/Time field (even if it is set to only display
the Date) you will need to use TIMESTAMP instead of DATE.

i.e.  October 28, 2020 in a Date/Time field is 1603861200. The same date
in a Date Only field is 2459151.

Fred
 

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Tuesday, October 28, 2008 5:51 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 I usually have to put the Date fields inside quotes when doing
 calculations

 'my_date_field'  ($DATE$ + 182)

I've tried that. It doesn't work.I've entered 28.10.2020 into my date
field, i.e. I'm saying in my AL RunIf qualification: 28.10.2020 
($DATE$ + 1), but the AL goes into else action. As this example
shows it doesn't really matter it ARS sees date as second, days, week
or even years. Year 2020 is so far in the future, that it should work
anyway, but it doesn't.

BTW, I'm on 6.3 Patch 24.

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-28 Thread strauss
There was a native Macintosh client through version 3.2.  It was one of the 
reasons we originally bought the product.

Christopher Strauss, Ph.D.
Call Tracking Administration Manager
University of North Texas Computing  IT Center
http://itsm.unt.edu/

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:[EMAIL PROTECTED] On Behalf Of Meyer, Jennifer L
 Sent: Tuesday, October 28, 2008 8:22 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Adding days to a Date field in a qualification doesn't
 work

 Mark,

 I know there was a Unix Client and a Windows Client, I will have to
 guess on the 3rd client--Linux?

 Jennifer Meyer
 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
 Sent: Tuesday, October 28, 2008 6:56 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Adding days to a Date field in a qualification doesn't
 work

  An easy way to do this is to use the multipliers. You will also need
 to
  use $TIMESTAMP$
 
  'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))
 
  $TIMESTAMP$ returns the number of seconds elapsed since midnight
  Coordinated Universal Time (UTC) of January 1, 1970.
 
  Guess what platform Remedy ARS was first built upon? That's right
 UNIX.
  There used to be 3 clients. Anyone know what they were? Note: Remedy
 ARS
  was built before there was a Public Internet. Come to think of it,
 there
  may have been 4 clients at one time, but there may not have been one
 for
  IBM OS/2.
 
  When you do it this way, you can substitute a $variable or a number
  whenever you like.

 I've tried that too, of course. When your my_date_field is a DATE
 field the example you're showing will  n o t  work.
 At least on my 6.3 patch 024 it just doesn't work.

 Thanks anyway!
 Mark

 ___
 
 UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
 Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

 ___
 
 UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
 Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread LJ Longwing
have you tried 

'my_date_field'  ($DATE$ + 182)

so that it will add 182 to the date before doing the compare?

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 8:27 AM
To: arslist@ARSLIST.ORG
Subject: Adding days to a Date field in a qualification doesn't work

Hi Listers,

I have a date field on my form and I want to check, if the date entered
isn't later than 6 months from now. I have an Active Link with the following
qualification:

'my_date_field'  $DATE$ + 182

This doesn't work.

'my_date_field'  $DATE$ works just fine. As soon as I try to add any number
the $DATE$ variable it stops working.

Why?


Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:
www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Mark Milke
 'my_date_field'  ($DATE$ + 182)
 so that it will add 182 to the date before doing the compare?

Yes, that's exactly what I did.

Mark

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Grooms, Frederick W
I usually have to put the Date fields inside quotes when doing
calculations

'my_date_field'  ($DATE$ + 182) 

Fred

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 10:08 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 'my_date_field'  ($DATE$ + 182)
 so that it will add 182 to the date before doing the compare?

Yes, that's exactly what I did.

Mark

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Tanner, Doug
Try

'my_date_field'  ($DATE$ + 15724800)

Humor me
Doug

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 11:08 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 'my_date_field'  ($DATE$ + 182)
 so that it will add 182 to the date before doing the compare?

Yes, that's exactly what I did.

Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


DISCLAIMER Important! This message is intended for the above named person(s) 
only and is CONFIDENTIAL AND PROPRIETARY. If you are not the intended recipient 
of this e-mail and have received it in error, please immediately notify the 
sender by return email and then delete it from your mailbox. This message may 
be protected by the attorney-client privilege and/or work product doctrine.  
Accessing, copying, disseminating or re-using any of the information contained 
in this e-mail by anyone other than the intended recipient is strictly 
prohibited. Finally, you should check this email and any attachments for the 
presence of viruses, as the sender accepts no liability for any damage caused 
by any virus transmitted by this email.  Thank you.

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Opela, Gary L CTR USAF AFMC 72 CS/SCBAH
Yeah, I think that doug is on to something here. The $DATE$ keyword is
referring to seconds, I believe, and thus you need to add six months
worth of seconds. Note, that $DATE$ calculates to midnight that day, so
if you need to calculate six months from now, then you will likely need
to use $TIMESTAMP$. Using $DATE$ will give you 6 months from the
beginning of the current day. Also, as a good note, I would suggest
adding the parenthesis, although they should not be required.

Thanks,

Gary

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Tanner, Doug
Sent: Monday, October 27, 2008 10:18 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

Try

'my_date_field'  ($DATE$ + 15724800)

Humor me
Doug

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 11:08 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 'my_date_field'  ($DATE$ + 182)
 so that it will add 182 to the date before doing the compare?

Yes, that's exactly what I did.

Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


DISCLAIMER Important! This message is intended for the above named
person(s) only and is CONFIDENTIAL AND PROPRIETARY. If you are not the
intended recipient of this e-mail and have received it in error, please
immediately notify the sender by return email and then delete it from
your mailbox. This message may be protected by the attorney-client
privilege and/or work product doctrine.  Accessing, copying,
disseminating or re-using any of the information contained in this
e-mail by anyone other than the intended recipient is strictly
prohibited. Finally, you should check this email and any attachments for
the presence of viruses, as the sender accepts no liability for any
damage caused by any virus transmitted by this email.  Thank you.


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread LJ Longwing
Oh...I know why it's not workingbecause $DATE$ can be used for both Date
and Date/Time fieldsand remedy probably does some dynamic stuff to the
value when you are doing a compare with a date field...so what you may need
to do is

setfield ztmp_datefield = $DATE$
setfield ztmp_datefield = +182 

then in another filter my_date_field  ztmp_datefield

I bet that would work

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Tanner, Doug
Sent: Monday, October 27, 2008 9:18 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

Try

'my_date_field'  ($DATE$ + 15724800)

Humor me
Doug

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 11:08 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 'my_date_field'  ($DATE$ + 182)
 so that it will add 182 to the date before doing the compare?

Yes, that's exactly what I did.

Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:
www.rmsportal.com ARSlist: Where the Answers Are


DISCLAIMER Important! This message is intended for the above named person(s)
only and is CONFIDENTIAL AND PROPRIETARY. If you are not the intended
recipient of this e-mail and have received it in error, please immediately
notify the sender by return email and then delete it from your mailbox. This
message may be protected by the attorney-client privilege and/or work
product doctrine.  Accessing, copying, disseminating or re-using any of the
information contained in this e-mail by anyone other than the intended
recipient is strictly prohibited. Finally, you should check this email and
any attachments for the presence of viruses, as the sender accepts no
liability for any damage caused by any virus transmitted by this email.
Thank you.


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:
www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Tanner, Doug
Yeah, It is at the database level a Date/Time field, the DISPLAY
property is TIME

:)
Doug

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Opela, Gary L CTR USAF AFMC 72
CS/SCBAH
Sent: Monday, October 27, 2008 11:21 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

Yeah, I think that doug is on to something here. The $DATE$ keyword is
referring to seconds, I believe, and thus you need to add six months
worth of seconds. Note, that $DATE$ calculates to midnight that day, so
if you need to calculate six months from now, then you will likely need
to use $TIMESTAMP$. Using $DATE$ will give you 6 months from the
beginning of the current day. Also, as a good note, I would suggest
adding the parenthesis, although they should not be required.

Thanks,

Gary

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Tanner, Doug
Sent: Monday, October 27, 2008 10:18 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

Try

'my_date_field'  ($DATE$ + 15724800)

Humor me
Doug

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 11:08 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 'my_date_field'  ($DATE$ + 182)
 so that it will add 182 to the date before doing the compare?

Yes, that's exactly what I did.

Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


DISCLAIMER Important! This message is intended for the above named
person(s) only and is CONFIDENTIAL AND PROPRIETARY. If you are not the
intended recipient of this e-mail and have received it in error, please
immediately notify the sender by return email and then delete it from
your mailbox. This message may be protected by the attorney-client
privilege and/or work product doctrine.  Accessing, copying,
disseminating or re-using any of the information contained in this
e-mail by anyone other than the intended recipient is strictly
prohibited. Finally, you should check this email and any attachments for
the presence of viruses, as the sender accepts no liability for any
damage caused by any virus transmitted by this email.  Thank you.


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


DISCLAIMER Important! This message is intended for the above named person(s) 
only and is CONFIDENTIAL AND PROPRIETARY. If you are not the intended recipient 
of this e-mail and have received it in error, please immediately notify the 
sender by return email and then delete it from your mailbox. This message may 
be protected by the attorney-client privilege and/or work product doctrine.  
Accessing, copying, disseminating or re-using any of the information contained 
in this e-mail by anyone other than the intended recipient is strictly 
prohibited. Finally, you should check this email and any attachments for the 
presence of viruses, as the sender accepts no liability for any damage caused 
by any virus transmitted by this email.  Thank you.

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Frank, Gordon M. (CMS/CTR)
An easy way to do this is to use the multipliers. You will also need to
use $TIMESTAMP$

'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

$TIMESTAMP$ returns the number of seconds elapsed since midnight
Coordinated Universal Time (UTC) of January 1, 1970. 

Guess what platform Remedy ARS was first built upon? That's right UNIX.
There used to be 3 clients. Anyone know what they were? Note: Remedy ARS
was built before there was a Public Internet. Come to think of it, there
may have been 4 clients at one time, but there may not have been one for
IBM OS/2.

When you do it this way, you can substitute a $variable or a number
whenever you like.

Gordon M. Frank
Remedy Skilled Professional
ITIL V3 Certified
Lockheed Martin

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 10:27 AM
To: arslist@ARSLIST.ORG
Subject: Adding days to a Date field in a qualification doesn't work

Hi Listers,

I have a date field on my form and I want to check, if the date
entered isn't later than 6 months from now. I have an Active Link with
the following qualification:

'my_date_field'  $DATE$ + 182

This doesn't work.

'my_date_field'  $DATE$ works just fine. As soon as I try to add any
number the $DATE$ variable it stops working.

Why?


Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Rockwell, Rocky
What I use is $DATE$ + (60*60*24*182) in stead of the big long can't remember 
integer. That way I can see what I am adding.


Rocky
 
Rocky Rockwell
Remedy Application Designer
Wk Phone: 214-567-8874
Cell: 214-663-7229
[EMAIL PROTECTED]
-Original Message-
From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] 
On Behalf Of Tanner, Doug
Sent: Monday, October 27, 2008 10:18 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

Try

'my_date_field'  ($DATE$ + 15724800)

Humor me
Doug

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
Sent: Monday, October 27, 2008 11:08 AM
To: arslist@ARSLIST.ORG
Subject: Re: Adding days to a Date field in a qualification doesn't work

 'my_date_field'  ($DATE$ + 182)
 so that it will add 182 to the date before doing the compare?

Yes, that's exactly what I did.

Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


DISCLAIMER Important! This message is intended for the above named person(s) 
only and is CONFIDENTIAL AND PROPRIETARY. If you are not the intended recipient 
of this e-mail and have received it in error, please immediately notify the 
sender by return email and then delete it from your mailbox. This message may 
be protected by the attorney-client privilege and/or work product doctrine.  
Accessing, copying, disseminating or re-using any of the information contained 
in this e-mail by anyone other than the intended recipient is strictly 
prohibited. Finally, you should check this email and any attachments for the 
presence of viruses, as the sender accepts no liability for any damage caused 
by any virus transmitted by this email.  Thank you.

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are



Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Thomas Bean
Yes, that should work.

Although the $DATE$ keyword can be used for both Date and Date/Time fields, 
using an arithmetic operation against the keyword seems to force it to 
translate into a date/time value (# of seconds instead of # of days) at the 
database level.  You can observe this by running a SQL log on the server.

  Search Qual in Advanced Search bar in WUT:
  'zDateField' = $DATE$

  Corresponding query in SQL log ($DATE$ keyword converted to current Date 
integer value - # of days since January 1, 4713 B.C.):
  SELECT TOP 2147483649 T535.C1,T535.C1 FROM T535 WHERE (T535.C536870947 = 
2454767) ORDER BY 1 ASC

  Search Qual in Advanced Search bar in WUT:
  'zDateField' = $DATE$ - 7

  Corresponding query in SQL log ($DATE$ keyword converted to current Date/Time 
integer value - # of seconds since January 1, 1970 12:00:00 AM GMT):
  SELECT TOP 2147483649 T535.C1,T535.C1 FROM T535 WHERE (T535.C536870947 = 
(1225083600 - 7)) ORDER BY 1 ASC

The environment I tested this on is ARS 7.0.1 with a SQL Server 2005 database.

--Thomas

  - Original Message - 
  From: LJ Longwing 
  Newsgroups: gmane.comp.crm.arsystem.general
  To: arslist@ARSLIST.ORG 
  Sent: Monday, October 27, 2008 10:28 AM
  Subject: Re: Adding days to a Date field in a qualification doesn't work


  Oh...I know why it's not workingbecause $DATE$ can be used for both Date
  and Date/Time fieldsand remedy probably does some dynamic stuff to the
  value when you are doing a compare with a date field...so what you may need
  to do is

  setfield ztmp_datefield = $DATE$
  setfield ztmp_datefield = +182 

  then in another filter my_date_field  ztmp_datefield

  I bet that would work

  -Original Message-
  From: Action Request System discussion list(ARSList)
  [mailto:[EMAIL PROTECTED] On Behalf Of Tanner, Doug
  Sent: Monday, October 27, 2008 9:18 AM
  To: arslist@ARSLIST.ORG
  Subject: Re: Adding days to a Date field in a qualification doesn't work

  Try

  'my_date_field'  ($DATE$ + 15724800)

  Humor me
  Doug

  -Original Message-
  From: Action Request System discussion list(ARSList)
  [mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
  Sent: Monday, October 27, 2008 11:08 AM
  To: arslist@ARSLIST.ORG
  Subject: Re: Adding days to a Date field in a qualification doesn't work

   'my_date_field'  ($DATE$ + 182)
   so that it will add 182 to the date before doing the compare?

  Yes, that's exactly what I did.

  Mark

  
  ___
  UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:
  www.rmsportal.com ARSlist: Where the Answers Are


  DISCLAIMER Important! This message is intended for the above named person(s)
  only and is CONFIDENTIAL AND PROPRIETARY. If you are not the intended
  recipient of this e-mail and have received it in error, please immediately
  notify the sender by return email and then delete it from your mailbox. This
  message may be protected by the attorney-client privilege and/or work
  product doctrine.  Accessing, copying, disseminating or re-using any of the
  information contained in this e-mail by anyone other than the intended
  recipient is strictly prohibited. Finally, you should check this email and
  any attachments for the presence of viruses, as the sender accepts no
  liability for any damage caused by any virus transmitted by this email.
  Thank you.

  
  ___
  UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:
  www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Thomas Bean
Frank,
This syntax will work if searching a Date/Time field, but it will not work with 
a Date (only) field.  The value on the right side of the qualification 
(($TIMESTAMP$ + (60*60*24*182)) would generate an integer value well beyond the 
range of the Date field type.  If you divided this value by 86400 (the # of 
seconds in a day) and then added the value 2440588 (the corresponding # of days 
for the DATE field type for January 1, 1970), this would theoretically work; 
however, adding these arithmetic operations to the search qualification with a 
Date field seems to generate an error in the client:

ARERR [313] Data types are not appropriate for relational operation
ARERR [312] Data types are not appropriate for arithmetic operation

So, LJ's method seems like the best (add an additional display-only DATE field, 
use the DATEADD function to add the offset from the $DATE$ keyword into the 
temp field, then use the temp field in place of the $DATE$ keyword in the 
original query against the DATE field).

--Thomas

  - Original Message - 
  From: Frank, Gordon M. (CMS/CTR) 
  Newsgroups: gmane.comp.crm.arsystem.general
  To: arslist@ARSLIST.ORG 
  Sent: Monday, October 27, 2008 10:40 AM
  Subject: Re: Adding days to a Date field in a qualification doesn't work


  An easy way to do this is to use the multipliers. You will also need to
  use $TIMESTAMP$

  'my_date_field'  ($TIMESTAMP$ + (60*60*24*182))

  $TIMESTAMP$ returns the number of seconds elapsed since midnight
  Coordinated Universal Time (UTC) of January 1, 1970. 

  Guess what platform Remedy ARS was first built upon? That's right UNIX.
  There used to be 3 clients. Anyone know what they were? Note: Remedy ARS
  was built before there was a Public Internet. Come to think of it, there
  may have been 4 clients at one time, but there may not have been one for
  IBM OS/2.

  When you do it this way, you can substitute a $variable or a number
  whenever you like.

  Gordon M. Frank
  Remedy Skilled Professional
  ITIL V3 Certified
  Lockheed Martin

  -Original Message-
  From: Action Request System discussion list(ARSList)
  [mailto:[EMAIL PROTECTED] On Behalf Of Mark Milke
  Sent: Monday, October 27, 2008 10:27 AM
  To: arslist@ARSLIST.ORG
  Subject: Adding days to a Date field in a qualification doesn't work

  Hi Listers,

  I have a date field on my form and I want to check, if the date
  entered isn't later than 6 months from now. I have an Active Link with
  the following qualification:

  'my_date_field'  $DATE$ + 182

  This doesn't work.

  'my_date_field'  $DATE$ works just fine. As soon as I try to add any
  number the $DATE$ variable it stops working.

  Why?


  Mark

  
  ___
  UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
  Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are


Re: Adding days to a Date field in a qualification doesn't work

2008-10-27 Thread Joe DeSouza
Mark,

Even if that did work, it wouldn't be always accurate, considering leap years 
or the 2 consecutive months that we have 30 days.

Why not try string manupulation, by setting the current value contained in the 
date field, to a character field and then find the month position and extract 
the month part of the string, set that to a display only integer field, add 6 
to it, and reconstruct the date string.. Consider the exception for when you 
will need to add up the year part if the month part is greater than 6.

Also create exceptions for the month of February to handle leap years.

Might be tricky but you will end up with a more accurate result..

Cheers

Joe






From: Mark Milke [EMAIL PROTECTED]
To: arslist@ARSLIST.ORG
Sent: Monday, October 27, 2008 10:27:04 AM
Subject: Adding days to a Date field in a qualification doesn't work

Hi Listers,

I have a date field on my form and I want to check, if the date entered isn't 
later than 6 months from now. I have an Active Link with the following 
qualification:

'my_date_field'  $DATE$ + 182

This doesn't work.

'my_date_field'  $DATE$ works just fine. As soon as I try to add any number 
the $DATE$ variable it stops working.

Why?


Mark



___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are