Display formats

Questions related to using nuBuilder Forte.

Display formats

Unread postby Marvo » Fri Nov 19, 2021 7:53 am

Hi

I have a Time field in a Browse/Edit form. When I add a new record, the time field displays correctly and I can enter a time e.g. 13:00
And it loos fine in the Edit form

In the Browse form it displays as 13:00:00

I don't want to show the seconds so I edited the Browse form properties - Time column - Format and added my custom format: hh:nn

Now the Browse screen doesn't display the Time at all - just a null/blank field

Just confused how to get the time to display as hh:nn in the Browse form

Thanks for any help
Marvo
 
Posts: 12
Joined: Tue Nov 16, 2021 7:41 am
nuBuilder Version: 4.5

Re: Display formats

Unread postby kev1n » Fri Nov 19, 2021 4:08 pm

What data type is the time column in the database?
kev1n
nuBuilder Team
 
Posts: 2117
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Display formats

Unread postby Marvo » Fri Nov 19, 2021 10:18 pm

kev1n wrote:What data type is the time column in the database?



in the database the column data type is 'time'
Marvo
 
Posts: 12
Joined: Tue Nov 16, 2021 7:41 am
nuBuilder Version: 4.5

Re: Display formats

Unread postby kev1n » Fri Nov 19, 2021 10:25 pm

Use TIME_FORMAT() to format the time.
Attachments
time_format.png
time_format.png (5.25 KiB) Viewed 40 times
kev1n
nuBuilder Team
 
Posts: 2117
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Display formats

Unread postby Marvo » Fri Nov 19, 2021 10:52 pm

Thanks Kevin!

I added a %: in the middle to format correctly. I now understand the SQL time formats H, h, I, i.
I'm just curious about why the system doesn't use the format I created for the Edit form - hh:nn ?

It's working anyway - so thank you!
Marvo
 
Posts: 12
Joined: Tue Nov 16, 2021 7:41 am
nuBuilder Version: 4.5

Re: Display formats

Unread postby kev1n » Fri Nov 19, 2021 11:38 pm

Can you try this updated nuformclass.js ? Replace the existing one in the /core folder and log in again.
Attachments
nuformclass.zip
(6.7 KiB) Downloaded 4 times
kev1n
nuBuilder Team
 
Posts: 2117
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5


Return to General

Who is online

Users browsing this forum: No registered users and 21 guests

cron