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, P23....using 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"