Syntax: dbo.fn_BetDateTime(id_trade, bet_num, property)
Output: (datetime) Returns timestamp properties of a bet.
Input parameters:
id_trade (integer) | Id of the trade | bet_num (integer) | bet ordinal position into the trade | property (string) | Can return one of the following timestamps:- 'place' = timestamp when the bet was placed
- 'match' = timestamp when the bet was matched
|
Example:
<bet index="2" bid_type="l"> <place condition="(dbo.fn_betproperty(@id_trade,1,'status') = @@status_matched) and (datediff(second,dbo.fn_BetDateTime(@id_trade, 1, 'match'),getdate())>10)" size="2" price="@best_lay_price" close_trade="y" /> </bet> If the first bet of the current trade has been matched from more than 10 seconds, place a second bet of size 2 at the best lay price. datediff and getdate are a Microsoft Sql Server internal functions.
|