An extension of 13743, but specific to date related fields.
For Date, Time and/or Timestamp fields, you should also be able to specify a "pre-defined" default that would inject the current date/time/timestamp, maybe something like:
Possibly within the following defaults:
Now would be a special default that will automatically insert the current date or time or a timestamp based on the column type.
We already have support for current date and time. See the documentation link here: https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/Documentation16/page/51/Parameterized-Scripts
Date and time expressions in parameter values scripts.
Current Units
-------------------
d = current date
t = current
dt = current date time
dm = current date at midnight
Examples:
{d-1y} = current date - 1 year
{dt-2h-3m-8s-340S} = current date and time minus 2 hours, minus 3 minutes, minus 8 seconds, minus 340 milliseconds
{dm+6h} = current date at midnight, plus 6 hours ... basically today at 6am.
- SQL Example:
[This query will return a list of orders that have occurred in the last month]
SELECT * FROM ORDERS WHERE ORDER_DATE > &myparam={dt-1M}
select * from orders
where orderdate > &myparam={dt-10y-4M-18d}
Issue #13744 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
We already have support for current date and time. See the documentation link here: https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/Documentation16/page/51/Parameterized-Scripts
Date and time expressions in parameter values scripts.
Current Units
-------------------
d = current date
t = current
dt = current date time
dm = current date at midnight
Examples:
{d-1y} = current date - 1 year
{dt-2h-3m-8s-340S} = current date and time minus 2 hours, minus 3 minutes, minus 8 seconds, minus 340 milliseconds
{dm+6h} = current date at midnight, plus 6 hours ... basically today at 6am.
- SQL Example:
[This query will return a list of orders that have occurred in the last month]
SELECT * FROM ORDERS WHERE ORDER_DATE > &myparam={dt-1M}
select * from orders
where orderdate > &myparam={dt-10y-4M-18d}