Welcome to the nuBuilder Forums!

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

AM PM format in browse view

Questions related to using nuBuilder Forte.
Post Reply
databs1234
Posts: 30
Joined: Wed Sep 06, 2023 12:45 am

AM PM format in browse view

Unread post by databs1234 »

Is there a way to get the browse view of the time format to show as AM / PM and 1-12? I have it in AM/PM 1-12 in the form view but the browse view defaults to 1-24 (the AM PM does show, but the 1-24 rather than 1-12 is the format that shows). Thanks.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: AM PM format in browse view

Unread post by kev1n »

Format the time in the Display column, e.g.

Code: Select all

DATE_FORMAT(time_column, '%h:%i %p')
databs1234
Posts: 30
Joined: Wed Sep 06, 2023 12:45 am

Re: AM PM format in browse view

Unread post by databs1234 »

Where should this code be placed? I put it as in the screenshot below but it didn't change the date. Thanks.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: AM PM format in browse view

Unread post by kev1n »

DATE_FORMAT() is a MySQL function, not a JavaScript function. Additionally, make sure to replace 'column_name' with the actual name of the column you want to format.
browser_format.png
You do not have the required permissions to view the files attached to this post.
databs1234
Posts: 30
Joined: Wed Sep 06, 2023 12:45 am

Re: AM PM format in browse view

Unread post by databs1234 »

Thanks for your help, worked great.
Post Reply