Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the the contents of the second datetime field. The SQL solution would use DATEADD and DATEDIFF functions or the TIMESTAMPADD and TIMESTAMPDIFF functions - see HERE.

Unfortunatale, these functions are not aailable in the default database engine HSQLDB version 1.8 - you'll need to uograde your setup to use HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the the contents of the second datetime field. The SQL solution would use DATEADD and DATEDIFF functions or the TIMESTAMPADD and TIMESTAMPDIFF functions - see HERE.

Unfortunatale, Unfortunately, these functions are not aailable in the default database engine HSQLDB version 1.8 - you'll need to uograde your setup to use HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the the contents of the second datetime field. The SQL solution would use DATEADD and DATEDIFF functions or the TIMESTAMPADD and TIMESTAMPDIFF functions - see HERE.

Unfortunately, these functions are not aailable in the default database engine HSQLDB version 1.8 - so you'll need to uograde upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the the contents of the second datetime field. The SQL solution would use DATEADD and DATEDIFF functions or the TIMESTAMPADD and TIMESTAMPDIFF functions - see HERE.

Unfortunately, these functions are not aailable available in the default database engine HSQLDB version 1.8 - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the the contents of the second datetime field. The SQL solution would use DATEADD and DATEDIFF functions or the TIMESTAMPADD and TIMESTAMPDIFF functions - see HERE.

Unfortunately, these functions are not available in the default database engine HSQLDB version 1.8 - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the contents of the second datetime field. The SQL solution would use DATEADD and DATEDIFF functions or the TIMESTAMPADD and TIMESTAMPDIFF functions - see HERE.

Unfortunately, these functions the above SQL functions are not not available in the default database engine HSQLDB version 1.8 used by Base - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the contents of the second datetime field. The SQL solution would use DATEADD and DATEDIFF functions or the TIMESTAMPADD and TIMESTAMPDIFF functions - see HERE.

Unfortunately, the above SQL functions are not available in the default database engine HSQLDB version 1.8 used by Base - see HERE - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the contents of the second datetime field. The SQL solution would use DATEADD or the TIMESTAMPADD - see HERE.

Unfortunately, the above SQL functions are not available in the default database engine HSQLDB version 1.8 used by Base - see HERE - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it.

it. Note: there is a macro given in the second-last reference that might be able to be modified to do what you want under the the default database engine.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the contents of the second datetime field. The SQL solution would use DATEADD or the TIMESTAMPADD - see HERE.

Unfortunately, the above SQL functions are not available in the default database engine HSQLDB version 1.8 used by Base - see HERE - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it. Note: there is a macro given in the second-last reference that might be able to be modified to do what you want under the the default database engine.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the contents of the second datetime field. The SQL solution would use DATEADD or the TIMESTAMPADD - see HERE.

Unfortunately, the above SQL functions are not available in the default database engine HSQLDB version 1.8 used by Base - see HERE - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it. Note: there is a macro given in the second-last reference that might be able to be modified to do what you want under the default database engine.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the contents of the second datetime field. The SQL solution would use TIMESTAMPADD - see HERE.

Unfortunately, some of the above SQL functions are not available in the default database engine HSQLDB version 1.8 used by Base - see HERE - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it. Note: there is a macro given in the second-last reference that might be able to be modified to do what you want under the default database engine.

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

See this answer.

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time difference in minutes, in relation to the first field, and the result to be stored in the second datetime field.

Sounds like you will need a macro (basic code) or a trigger (SQL code) which executes when you enter your 'time difference' data to compute the contents of the second datetime field. The SQL solution would use TIMESTAMPADD - see HERE.

Unfortunately, some of the above SQL functions are not available in the default database engine HSQLDB version 1.8 used by Base - see HERE - so you'll need to upgrade your setup to use the current HSQLDB v.2.x in a 'split' mode configuration - see THIS TUTORIAL on how to do it. Note: there is a macro given in the second-last reference that might be able to be modified to do what you want under the default database engine.

One final point; you don't necessarily need to update your table to actually store the new calculated timestamp. You could just display it in a result-set using a query (i.e. SELECT statement) incorporating the TIMESTAMPADD function to compute the new datetime value.