Perform date calculations on a from

Hello All,
I have a bit of a database and am using the BASE front end. I would like to be able to calculate the difference between the “startdate” and today. its easy enough in a query:

SELECT “table1”.“startdate”, DATEDIFF(day, “startdate”, CURRENT_DATE) FROM “Table1”

I just can’t figure out how to get that query onto a form and into a label or text box. It does not need to go into a data field in a table.

Thank you in advance.

Hello,

The easiest method is to use the Wizard.

  • On main screen of Base, in left section select Forms.

  • In Tasks section select Use Wizard to Create Form

  • Form Wizard dialog appears

  • In the list box select your Query

  • In the Field selection chose some or all fields wanted

  • Select Next button

  • Proceed through all screens of the dialog until finished

Thank you, but I have the form. I am looking to do a calculation and pass that information to a textbox or label.
Have a great day.

@Nirliq,

This would have been appropriate to place in the original question. However it is not enough. This data must be in some way related to what is on the form already. Is this incorrect? Or what is the relation? Or do you just want to place somewhere on form?

With this last remark, you can simply add another internal form. In edit mode, use Form Navigator icon on Form Design toolbar.

Thank you, That is exactly what I was looking for. I am able to drop a text box onto that form and connect it to my query. Note I had tried that but I guess I did not go far enough.

Thank you for your help.