Ask Your Question
0

Add date calculation to Libre Draw

asked 2020-05-31 15:53:36 +0100

Greg01 gravatar image

updated 2020-06-01 03:16:28 +0100

keme gravatar image

I operate a business that requires product labeling with an expiry date. I use Libre Draw for the label generation. I want to put an auto-generated expiry on each label with a date of Today + 365 days. How do I add that to Libre Draw. I assume I will use some formula in Libre Calc and move it over to Draw. I need the formula and the steps necessary to move it, or do everything in Draw if possible.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2020-06-01 03:13:10 +0100

keme gravatar image
  • In Calc, enter formula =TODAY() + 365 in a cell
  • Select the cell and copy it
  • Paste into Draw

The pasted object is a complete spreadsheet object with calculation capability. It should update whenever you reopen the file. If you leave it open, double click the date to enter Edit mode, and press function key F9 to update.

edit flag offensive delete link more
0

answered 2020-05-31 18:26:47 +0100

Lupp gravatar image

All the objects you can insert into a drawing are shapes of one or another kind, and none of them offers a service (via interface) for calculations or formatting of numeric data.
The so-called textfields you ca insert are next to useless. In specific concerning dates they aren't usable since they neither allow to define an offset (your 356 days) nor accept any reasonable format. Draw files generally don't support the NumberFormats feature.
Therefore I can only see one way:
Rely on user code (a little Basic Sub e.g.) and use the capabilities of Basic concerning calculations and formatting of numbers. The result can then be inserted into a shape as text.
Th attached example drawing is containing such a Sub whichwilol run for you as a demo. It is very primitive an will require refinements and adaptions to your needs.
C:\fakepath\ask247448shapesShowingCalculatedDate_1.odg

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-31 15:53:36 +0100

Seen: 43 times

Last updated: Jun 01 '20