Ask Your Question
0

Perform date calculations on a from

asked 2021-04-25 19:55:45 +0200

Nirliq gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-04-25 20:14:49 +0200

Ratslinger gravatar image

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

edit flag offensive delete link more

Comments

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 gravatar imageNirliq ( 2021-04-25 23:45:15 +0200 )edit

@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.

Ratslinger gravatar imageRatslinger ( 2021-04-25 23:54:34 +0200 )edit

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.

Nirliq gravatar imageNirliq ( 2021-04-26 02:16:07 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-04-25 19:55:45 +0200

Seen: 16 times

Last updated: Apr 25