Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#136321 - 01/09/07 08:37 AM Summing Date/Time and Time fields
mor_rn Offline
Stealth Member

Registered: 12/18/06
Posts: 10
Hello,

I have 2 field in my form:
1. a Date/Time field.
2. a Time field.

I want to sum up the two so in the end I'll have a Date/Time field which will hold the value of 1+2 (The date from 1 plus the hours from 2).

I have no idea how to sum up the two.
Can you help? (This is quite urgent for me..)

Thanks ahead!

Top
#136322 - 01/09/07 11:14 AM Re: Summing Date/Time and Time fields [Re: mor_rn]
Matt Reinfeldt Offline
Old Hand
***

Registered: 06/12/01
Posts: 1419
Loc: Madison, WI
Read the section in the Advanced Admin Guide on "Using Business Time in the AR System Server". There are a whole series of commands you can use to get to what you need.
_________________________
Matt Reinfeldt
I belong to the following Professional Networks:
http://www.naymz.com/search/matt/reinfeldt/1524717
http://www.linkedin.com/in/mreinfeldt

Top
#136325 - 01/09/07 01:09 PM Re: Summing Date/Time and Time fields [Re: Matt Reinfeldt]
mor_rn Offline
Stealth Member

Registered: 12/18/06
Posts: 10
First of all thanks..
But by the explanation there I realized that you can add days with the $PROCESS$ Application-Bus-Time-Add, but I want to add hours..
How do I do that?

Top
#136327 - 01/09/07 01:59 PM Re: Summing Date/Time and Time fields [Re: mor_rn]
Matt Reinfeldt Offline
Old Hand
***

Registered: 06/12/01
Posts: 1419
Loc: Madison, WI
Make sure to set the Offset Units to hours.

OffsetUnits—Unit of time. It can be set to 1 for seconds, 2 for minutes, 3 for hours, and 4 for days. Any other setting will revert to hours (3).
_________________________
Matt Reinfeldt
I belong to the following Professional Networks:
http://www.naymz.com/search/matt/reinfeldt/1524717
http://www.linkedin.com/in/mreinfeldt

Top
#136328 - 01/09/07 02:04 PM Re: Summing Date/Time and Time fields [Re: Matt Reinfeldt]
mor_rn Offline
Stealth Member

Registered: 12/18/06
Posts: 10
Got it. Thanks alot!!

Top
#136329 - 01/09/07 02:15 PM Re: Summing Date/Time and Time fields [Re: mor_rn]
Matt Reinfeldt Offline
Old Hand
***

Registered: 06/12/01
Posts: 1419
Loc: Madison, WI
No problem! Good luck!
_________________________
Matt Reinfeldt
I belong to the following Professional Networks:
http://www.naymz.com/search/matt/reinfeldt/1524717
http://www.linkedin.com/in/mreinfeldt

Top
#136449 - 01/23/07 11:51 PM Re: Summing Date/Time and Time fields [Re: Matt Reinfeldt]
mor_rn Offline
Stealth Member

Registered: 12/18/06
Posts: 10
Hello again,

I've tried performing the following action inside an Active Link:
$PROCESS$ Application-Bus-Time-Add "08/08/2006 09:00:00" "1"
and put it in a Date-Time field.
However, the Remedy User puts out an error:" Set fields active link running a process failed (ARERR 1603)".

Can you tell me what am I doing wrong? (I've also tried putting only the date without the time, but still the same error occurs)

Thanks ahead

Top
#136456 - 01/24/07 03:10 AM Re: Summing Date/Time and Time fields [Re: mor_rn]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Hi,

You must use UNIX timestamp date format with this process.
_________________________
Vincent.

Top
#136458 - 01/24/07 03:23 AM Re: Summing Date/Time and Time fields [Re: Vincent_RIEDWEG]
mor_rn Offline
Stealth Member

Registered: 12/18/06
Posts: 10
What is the UNIX timestamp? What if I want a field named "nnn" of type Date-Time to be instead of the timestamp?

Top
#136460 - 01/24/07 03:48 AM Re: Summing Date/Time and Time fields [Re: mor_rn]
thwe Offline
Stealth Member

Registered: 03/11/04
Posts: 188
Loc: Germany
You have to use @@: before the process, because it is a server process:

$PROCESS$ @@:Application-Bus-Time-Add

Top
#136461 - 01/24/07 04:20 AM Re: Summing Date/Time and Time fields [Re: mor_rn]
mor_rn Offline
Stealth Member

Registered: 12/18/06
Posts: 10
Nevermind, I managed to solve it.
Thanks!!

Top
#136462 - 01/24/07 04:38 AM Re: Summing Date/Time and Time fields [Re: thwe]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
You can use Date/Time field because these fields are stored in the UNIX timestamp format in the database.

The UNIX timestamp is the number of seconds between your date and the 01/01/1970.
_________________________
Vincent.

Top
Page 1 of 2 1 2 >