What is the best way to put a date in my template?

What is the best way to put a date in my template?

This article has been machine translated. If you find any errors, we would be grateful if you could report them to translation@timesensor.com.

There are different ways to include a date in your template. This entry shows how the different variants differ. It is assumed that you are familiar with creating templates. Otherwise, please study the videos in the corresponding section.

4D Ausdruck einfügen

Option 1: Insert date fields

Of course you can insert a 4D database field directly into your template. In the insertion dialogue you have the possibility to influence the display:
However, inserting a field into your template becomes a disadvantage if you want to print templates in foreign languages. The database will return the date in the language of the operating system.

Option 2: Use UTI_GetLetterDate

You can use the UTI_GetLetterDate function. Since you can give the language as the first argument to this function, the date will be returned in the corresponding language (the month name will be written out). With only one argument, the current date is returned. As an (optional) second argument, a database field can be passed. For example, you can have the invoice date output in the desired language.

Option 3: Use GEN_INSERT

The expression "GEN_INSERT" allows you to insert place and date. The first argument determines which date should be used:
letterdate returns the date of the record (i.e. the underlying invoice, for example).
currentdate returns the current date
As a second argument you can specify a language code, e.g. de, fr, en, etc.

Comparison

The following list shows the different expressions and the result achieved (here using the example of an English-language template).


    • Related Articles

    • What is the Best Way to Add a Date in a Template?

      There are several ways to add a date in your templates. This entry will show you three options and their differences. If you're not familiar with templates, we advise you to watch the tutorials first. Option 1: Add a Date Field You can easily add a ...
    • How Can I Update the Date on an Unprinted Invoice?

      Whenever you create an invoice with timeSensor LEGAL, it will first show up in your list of "unprinted invoices". Even invoices that timeSensor LEGAL is set up to create automatically will first show up as "unprinted invoices". If you do not print ...
    • How can I generate a list of work in progress by key date?

      You can use timeSensor LEGAL to print out a list of services that have not yet been billed as of a specific key date. The process is as follows: Select the services In the "Finance" area, click on the "Clients" button to display the client list. In ...
    • How do I put the Exchange interface into operation?

      This article has been machine translated. If you find any errors, we would be grateful if you could report them to translation@timesensor.com. What is Microsoft Exchange? Microsoft Exchange Server is a groupware and e-mail transport server software ...
    • How do I update the invoice date of unprinted invoices?

      If you create an invoice with timeSensor LEGAL, it initially remains in the list of unprinted invoices . timeSensor LEGAL itself can also automatically create invoices and these also appear in the unprinted invoices . If you do not print these ...