08-03-2011 04:12 AM
I need to add a activity record in activitycm3r table
please help me with code..
08-03-2011 05:08 AM
Take a look at following script:
This script demonstrates calling the datetimestamp function. It selects a record from the contacts
table and updates the sysmodtime field.
var f = new SCFile( "contacts" );
f.doSelect( "contact.name = \"BROWN, NICHOLAS\"" );
print( "sysmodtime was: " + f.sysmodtime );
datetimestamp( f, "sysmodtime" );
print( "sysmodtime is now: " + f.sysmodtime );
08-03-2011 05:30 AM
negative date stamp is calculated as below,
negdatestamp in $L.activity='31/12/2199 21:30:00' - tod()
and for JS you have to use
negdatestamp in $L.activity='31/12/2199 21:30:00' - system.functions.tod()
but '31/12/2199 21:30:00' need to be in JS date type.
08-03-2011 07:29 AM
I have created a scheduler which runs weekly to close the change records. when the changes are closed an activity record also has to be created, for this i need a negdatestamp field
08-03-2011 07:42 AM
12-03-2013 04:25 AM
Bumping up an old thread, but seemingly nobody answered to this question...
I tried various ways, but finally this seems to work.
So actually I'm using RAD application parse_evaluate to do the dirty job.
(RAD application sc.activity is were I found the "max value" for date, 31/12/2199 18:00:00.)
I skip the thread every time 1) word "urgent" is used or 2) an old thread has been hijacked.
12-03-2013 10:19 AM
Here's what we use -
var End = new Date('12/31/2199 11:00:00')
var Now = new Date(system.functions.tod())
var Duration = End-Now
var Duration = Duration/1000/60
var conDuration = new XMLDate(Duration)
var Then = new Date(conDuration)
The end result is the variable 'Then' is the negative datestamp, so we have something like:
12-03-2013 10:41 AM
This is what i get when i print each line
Then Invalid Date
conDuration 2 67962 22:20:49
conDuration [C++ object XMLDate] - P67962DT22H20M49S
Duration 2 97866620.81668334
Now Tue Dec 03 2013 12:39:10 GMT-0600 (CST)
End Tue Dec 31 2199 11:00:00 GMT-0600 (CST)
12-03-2013 10:51 AM