如何为 BQL 查询过滤器使用日期常量

How to use a date constant for a BQL query filter

我正在尝试通过 BQL 查询获取记录集,但我不知道如何为日期创建常量。我想根据硬日期值进行过滤 - 但我在任何地方都看不到日期常量的示例。我尝试使用带有日期值的字符串常量,但这没有用,如果我尝试这样使用 DateTime:

public const DateTime TranDate = Convert.ToDateTime("2017-04-01");

public class tranDate : Constant<DateTime>
{
    public tranDate() : base(TranDate) { }
}

我收到一个错误 - "cannot declare instance members in a static class"。

我对这个一头雾水...

尝试使用以下语法声明日期常量:

public class myDate : Constant<DateTime>
{
    public myDate()
        : base(new DateTime(2017, 04, 01))
    {
    }
}

详情见Acumatica BQL constants reference