Pat:

In Canada every possible date format was used by different clients. Therefore 
we had to write our own date handler. Essentially we handle it this way:

1. We let the system administrator set the format for all dates to be 
displayed. This includes all the ways 4D has built in way, but also in other 
ways that silly Canadians have dreamt up.

2. Where ever a date is displayed we use a Alphanumeric variable. We take the 
date as stored by 4D and we run it through our utility method to create a 
string in the format that the system administrator has set it to display. In 
this way no matter how a workstation is configured, the date is always 
displayed in a consistent format in our system.

3. The next nasty issue is date entry. For this we permit two options:

        a) The system administrator sets up an entry filter using our 
interface. Nothing fancy, the user must enter a fully formatted date, OR
        b) They decide to use our date entry system which makes for very quick 
entry of dates. I may be attributing this feature to the wrong person,
                 but I think I read about  it in a Dimensions article by Dave 
Baton (anyone correct me if I am wrong). 
                Over the years we have enhanced it a lot to make date entries 
very quick.
                The variable on screen where it is entered is a Alpha variable. 
They can enter things like T, 5d, 6m, -1W, etc to get a fully formatted date 
that
                our system will accept to turn into a 4D Date. They can also 
enter 2016, or 16 and tab out to get todays date but in 2016. If they enter 
2018-12, they will get
                a date for December 12, of the current year.
        c) We also have a button to take them to a Calendar ‘widget’ for the 
mousers in the user base.

        In all the entry examples above we have a method that runs and makes a 
properly formatted date that 4D will accept, place that date in the database.
        The system takes that 4D formatted date, and makes the display date.

        This certainly adds processing time when displaying thousands of record 
in a listbox (i.e. our 1 form Listbox for an output of all tables). We have 
fine tuned this
        code in our v16 shell so that once compiled it runs along nicely. 4D 
version 17 with it’s more intelligent Listbox will speed this up as it only 
deals with the rows
        that are visible on screen.

If that makes sense great - if not let me know where I lost you and I will try 
to explain better.

Jody


> On Jul 5, 2018, at 4:50 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jody,
> I'm using v16 and having the following problem with date formats:
> On a UK system, dates in fields and list boxes are incorrectly displayed in
> the US format. But when you click into a date field, it changes to the UK
> format!
> 
> How do you manage this?
> 
> Pat
> 
> On Sun, 10 Jun 2018 at 15:46, Jody Bevan via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> Bob:
>> 
>> Nasty date formats. About 15 years ago we created our own tool for the
>> date entry, and display in 4D. The dates are always stored in date fields,
>> but we let the user define the way the dates get displayed. This way it
>> does not matter what the computer’s region or date settings are. The format
>> set in the application controls the display of the date. It also resulted
>> in some great tools for quick entry of dates. Still loving that way of
>> doing thing in v16.
>> 
>> Jody
>> 
>> 
>>> On Jun 9, 2018, at 5:49 PM, Robert McKeever via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>>> 
>>> 4D V15.4, Mac OS 10.13.4
>>> 
>>> A site that uses 4D Server. Mostly mini’s as clients. Has been working
>> fine for years. Then growth, so someone brought in some PC’s. Then they
>> scrounged around and now all minis. But, since we are in Canada, sometimes
>> when the OS is loaded anew, this select Canadian English keyboard instead
>> of US. So, date entry gets set to YYYY-MM-DD instead of MM-DD-YYYY.
>>> 
>>> Dates display fine, regardless of format. But, on a couple of machines,
>> you can not enter dates. I take my record, place the cursor in the field,
>> and type - it moves the cursor along the character string, but nothing
>> changes. So, they just go to another machine that ‘works’ and does the
>> entry there. Started a couple of weeks ago.
>>> 
>>> So, why, and how to fix it?
>>> 
>>> Changing the date format in the system preferences changes the way it is
>> displayed, but still no entry.
>>> 
>>> _________________________________________
>>> Bob McKeever                      http://www.mswl.com <
>> http://www.mswl.com/>
>>> McKeever's Software Wizardry
>>> Port Coquitlam, B.C.
>>> bobmckee...@mac.com
>>> 
>> 
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **********************************************************************
> 
> 
> 
> -- 
> *************************************************
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *************************************************
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to