API: date format

(imported topic written by SystemAdmin)


I’m using BESAPI.FixletActionCreator, in particular SetTimeRange method and I don’t know how to format the dates.

I try this

2012-08-23 07:00:00 AM

but it doesn’t work; that format works in SetStartTime and SetExpiration methods.

Any help ?


(imported comment written by Lee Wei)

Looks like SetTimeRange() expects the values in VT_Date format, or Variant date/time format.

There is an example in the following file in JavaScript.

C:\Program Files\BigFix Enterprise\BES Server API\TestAPI.htm

// Set the range of Times of the day during which the action is allowed to run. 
// This sample will set it to run between the hours of 1 and 3 in the morning. var oneam = 

new Date(); oneam.setHours(1); oneam.setMinutes(0); var threeam = 

new Date(); threeam.setHours(3); threeam.setMinutes(0); actionCreator.SetTimeRange(oneam.getVarDate(),threeam.getVarDate());

Lee Wei