Topic Options
Rate This Topic
#132420 - 02/27/06 07:38 PM $DATE$ Keyword and Date fields
ron_legters Offline
journeyman

Registered: 03/11/04
Posts: 187
I've got a form that includes a 'Date Due' field. Things happen when we
pass this date. It's also included in emails about the request.

When I made it a date/time field, the email always included the time,
i.e. "This audit is due on 2/28/2006 12:00:00", so I changed it to be a
date field. Now the email looks great, but I can't compare the value to
the $DATE$ keyword, since the $DATE$ keyword is the number of seconds
since 1/1/1970 and 'date' fields are number of days since 1/1/something
BC.

I've researched the ARSList archives, and it looks like the solution is
to have both a 'Date' field and a 'Date/Time' field for this bit of
information. The posts weren't very current, though, so I'm hoping
there's a better solution out there.

Is there?

I'm on ARS 6.0.1 on a Windows 2003 server running MS SQL 2000.

Thanks,
Ron Legters
Tools Administrator
Production Systems Services
Univar USA
425.889.3952 Office
425.889.4111 Fax


UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org

Top
#132421 - 02/27/06 07:38 PM $DATE$ Keyword and Date fields [Re: edmund_lee]
ron_legters Offline
journeyman

Registered: 03/11/04
Posts: 187
I've got a form that includes a 'Date Due' field. Things happen when we
pass this date. It's also included in emails about the request.

When I made it a date/time field, the email always included the time,
i.e. "This audit is due on 2/28/2006 12:00:00", so I changed it to be a
date field. Now the email looks great, but I can't compare the value to
the $DATE$ keyword, since the $DATE$ keyword is the number of seconds
since 1/1/1970 and 'date' fields are number of days since 1/1/something
BC.

I've researched the ARSList archives, and it looks like the solution is
to have both a 'Date' field and a 'Date/Time' field for this bit of
information. The posts weren't very current, though, so I'm hoping
there's a better solution out there.

Is there?

I'm on ARS 6.0.1 on a Windows 2003 server running MS SQL 2000.

Thanks,
Ron Legters
Tools Administrator
Production Systems Services
Univar USA
425.889.3952 Office
425.889.4111 Fax


UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org

Top
#132422 - 03/01/06 01:20 AM Re: $DATE$ Keyword and Date fields [Re: edmund_lee]
beanta Offline
enthusiast

Registered: 09/15/04
Posts: 313
Ron,
I can't recall the bug/issue number, but in ARS 5.1 there is a bug that
makes the $DATE$ keyword unusable in Run-If comparisons against a 'Date'
field. I'm not sure if this bug was resolved in later releases or if it is
still a problem. According to the docs, the keyword is supposed to work
with either 'Date' or 'Date/Time' fields, NOT only 'Date/Time'. It is not
supposed to always return epoch seconds.

However, the keyword does work correctly as a "Set Fields" value for a
'Date' field. So, the best workaround I have found for this problem is to
set a display-only 'Date' field with the $DATE$ keyword, then use the
display-only 'Date' field in place of the $DATE$ keyword in any Run-If
statements.

HTH,

Thomas

----- Original Message -----
From: "Ron Legters"
Newsgroups: gmane.comp.crm.arsystem.general
Sent: Tuesday, February 28, 2006 13:38
Subject: $DATE$ Keyword and Date fields


I've got a form that includes a 'Date Due' field. Things happen when we
pass this date. It's also included in emails about the request.

When I made it a date/time field, the email always included the time,
i.e. "This audit is due on 2/28/2006 12:00:00", so I changed it to be a
date field. Now the email looks great, but I can't compare the value to
the $DATE$ keyword, since the $DATE$ keyword is the number of seconds
since 1/1/1970 and 'date' fields are number of days since 1/1/something
BC.

I've researched the ARSList archives, and it looks like the solution is
to have both a 'Date' field and a 'Date/Time' field for this bit of
information. The posts weren't very current, though, so I'm hoping
there's a better solution out there.

Is there?

I'm on ARS 6.0.1 on a Windows 2003 server running MS SQL 2000.

Thanks,
Ron Legters
Tools Administrator
Production Systems Services
Univar USA
425.889.3952 Office
425.889.4111 Fax


UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org

Top
#132423 - 02/28/06 08:33 PM Re: $DATE$ Keyword and Date fields [Re: edmund_lee]
ron_legters Offline
journeyman

Registered: 03/11/04
Posts: 187
Thanks for the feedback Thomas. I also submitted a ticket to Remedy
Support, and they said pretty much the same thing.

What I've ended up doing is adding a hidden Date/Time field, and
everytime the 'Date' field gets updated, the value gets set to the
Date/Time field, and I use this field in my comparisons.

Thanks again,
Ron Legters
Tools Admin
Univar USA Inc.


-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:arslist@ARSLIST.ORG] On Behalf Of Thomas Bean
Sent: Wednesday, March 01, 2006 5:20 AM
To: arslist@ARSLIST.ORG
Subject: Re: $DATE$ Keyword and Date fields

Ron,
I can't recall the bug/issue number, but in ARS 5.1 there is a bug that
makes the $DATE$ keyword unusable in Run-If comparisons against a 'Date'

field. I'm not sure if this bug was resolved in later releases or if it
is still a problem. According to the docs, the keyword is supposed to
work with either 'Date' or 'Date/Time' fields, NOT only 'Date/Time'. It
is not supposed to always return epoch seconds.

However, the keyword does work correctly as a "Set Fields" value for a
'Date' field. So, the best workaround I have found for this problem is
to set a display-only 'Date' field with the $DATE$ keyword, then use the
display-only 'Date' field in place of the $DATE$ keyword in any Run-If
statements.

HTH,

Thomas

----- Original Message -----
From: "Ron Legters"
Newsgroups: gmane.comp.crm.arsystem.general
Sent: Tuesday, February 28, 2006 13:38
Subject: $DATE$ Keyword and Date fields


I've got a form that includes a 'Date Due' field. Things happen when we
pass this date. It's also included in emails about the request.

When I made it a date/time field, the email always included the time,
i.e. "This audit is due on 2/28/2006 12:00:00", so I changed it to be a
date field. Now the email looks great, but I can't compare the value to
the $DATE$ keyword, since the $DATE$ keyword is the number of seconds
since 1/1/1970 and 'date' fields are number of days since 1/1/something
BC.

I've researched the ARSList archives, and it looks like the solution is
to have both a 'Date' field and a 'Date/Time' field for this bit of
information. The posts weren't very current, though, so I'm hoping
there's a better solution out there.

Is there?

I'm on ARS 6.0.1 on a Windows 2003 server running MS SQL 2000.

Thanks,
Ron Legters
Tools Administrator
Production Systems Services
Univar USA
425.889.3952 Office
425.889.4111 Fax



UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org


UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org

Top