Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Change the date output format on the 'Print' button

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Change the date output format on the 'Print' button

Unread post by kknm »

When using the standard print button of the viewing form, the date in the format 2020-06-12 08:00:00 is displayed.
I would like to see this date in the format 12.06.2020 08:00
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Change the date output format on the 'Print' button

Unread post by Janusz »

In the Form / Browse / Display field you need to define the format you want:
For example:
if your your field would be:

ofe_updated

replace it with:

Code: Select all

DATE_FORMAT(ofe_updated, "%d/%m/%Y %h:%i")
the Format field should stay empty.
If you like nuBuilder, please leave a review on SourceForge
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Change the date output format on the 'Print' button

Unread post by kknm »

Janusz wrote:In the Form / Browse / Display field you need to define the format you want:
For example:
if your your field would be:

ofe_updated

replace it with:

Code: Select all

DATE_FORMAT(ofe_updated, "%d/%m/%Y %h:%i")
the Format field should stay empty.
Where is
"Form / Browse / Display field" ? Do I need to create it?
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Change the date output format on the 'Print' button

Unread post by Janusz »

When you are on the form you want to modify press
CTRL+F
Next go to Browse Tab.
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Change the date output format on the 'Print' button

Unread post by Janusz »

CTRL+SHIFT+F
If you like nuBuilder, please leave a review on SourceForge
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Change the date output format on the 'Print' button

Unread post by kknm »

Janusz wrote:CTRL+SHIFT+F
Thank !
It was necessary to explain what is being done in the field that needs to be formatted.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Change the date output format on the 'Print' button

Unread post by kknm »

Janusz wrote:In the Form / Browse / Display field you need to define the format you want:
For example:
if your your field would be:

ofe_updated

replace it with:

Code: Select all

DATE_FORMAT(ofe_updated, "%d/%m/%Y %h:%i")
the Format field should stay empty.
Everything turned out, but the next problem appeared ... After I formatted the field for subform, it stopped working in the filter for the subform. I had to additionally enter the 'tab_data' field with width = 0 for subform, but now 2 fields with formatted and unformatted fields are printed from the main form. How to remove an unformatted field out of print?
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Change the date output format on the 'Print' button

Unread post by Janusz »

With standard print procedure as far as I know you can not exclude specific fields. Maybe try to redefine the filter format to comply with new date format if possible.
If you like nuBuilder, please leave a review on SourceForge
Post Reply