Page 1 of 1
AM PM format in browse view
Posted: Fri Jun 21, 2024 9:35 pm
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.
Re: AM PM format in browse view
Posted: Fri Jun 21, 2024 10:06 pm
by kev1n
Format the time in the Display column, e.g.
Code: Select all
DATE_FORMAT(time_column, '%h:%i %p')
Re: AM PM format in browse view
Posted: Wed Jun 26, 2024 3:43 pm
by databs1234
Where should this code be placed? I put it as in the screenshot below but it didn't change the date. Thanks.
Re: AM PM format in browse view
Posted: Wed Jun 26, 2024 4:13 pm
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
Re: AM PM format in browse view
Posted: Wed Jun 26, 2024 7:33 pm
by databs1234
Thanks for your help, worked great.