Date for UK table view

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

Date for UK table view

Post by mqley » 2021-01-06 17:21

Hi, I've had a good look in the forum but can't find a solution.

I'm trying to switch the date from USA: 01/06/2021 to UK: 06/01/2021 - how would one go about this? Thanks
Best Wishes,

Mark

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1709
Joined: 2018-04-01 10:12

Re: Date for UK table view

Post by pbottcher » 2021-01-06 18:05

Hi,

maybe this helps.

viewtopic.php?t=1758
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

Re: Date for UK table view

Post by mqley » 2021-01-06 23:35

Thanks very much, I'll have a go tomorrow.
Best Wishes,

Mark

mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

Re: Date for UK table view

Post by mqley » 2021-01-07 10:50

Hi, thanks again. Turns out just changing from the date_format function code from '%m/%d/%Y' to '%d/%m/%Y' does what I need. I didn't require the line 'sql("SET lc_time_names = 'en_GB'", $eo);' in _global.php

The change was in 'root> yourtablename_view.php (3 instances changed).

Leads to another question - will this get written over with next build? If so what's the best solution to avoid?

Regards
Best Wishes,

Mark

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1709
Joined: 2018-04-01 10:12

Re: Date for UK table view

Post by pbottcher » 2021-01-07 16:01

Hi,

yes that will be overwritten if you regenrate your app.
You can make that file read_only, but need to remember if you have changes to that table, you will need to allow overwriting that file and applying the changes again.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

Re: Date for UK table view

Post by mqley » 2021-01-07 17:23

Ok thanks. I'll make a note. Thanks very much.
Best Wishes,

Mark

pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: Date for UK table view

Post by pfrumkin » 2021-01-07 17:35

You could change the Data Format for each column using the AG UI. That way it would persist, but of course that may be more tedious if you have a lot of date columns. It is easy to add a data format if the one you want isn't there. Looks like the UK date/time is there but not just date. I added US Short Date very easily.

~Paul

Post Reply