getStartDateTime macro

Use this macro to get the start date of a Property the UserArea.

string getStartDateTime(long property.node)

Argument

Description

Property Node

The node of a previously retrieved property. Note that if the given node is not a property, the result is unpredictable.

Return value: The start date of the given property. This is a string in ISO format. If it must be stored in a table field with a datetime domain, it should be converted with function iso.to.utc().

Example:

long    property.node
long    ret
property.node = getNamedProperty("salary")
if property.node <> 0 then
    |* Update salary record
    select  txppl001.*
    from    txppl001 for update
    where   txppl001.emno = :bpmdm001.emno
    as set with 1 rows
    selectdo
        ret = dal.change.object("txppl001")
        dal.set.field("txppl001.sala", 
                val(getPropertyValue(property.node)))
        dal.set.field("txppl001.stdt",
                iso.to.utc(getStartDateTime(property.node)))
        dal.set.field("txppl001.endt",
                iso.to.utc(getEndDateTime(property.node)))
        ret = dal.save.object("txppl001")
        if ret <> 0 then
            dal.set.error.message(sprintf$(
             "@Cannot update salary for employee %s; error %d",
             bpmdm001.emno, ret))
            return(DALHOOKERROR)
        endif
    endselect
endif