Subject Re: Forms Processing Text Box buffer to Data Fields
From Mervyn Bick <invalid@invalid.invalid>
Date Sun, 14 Sep 2014 08:01:18 +0200
Newsgroups dbase.getting-started

On Sat, 13 Sep 2014 23:09:52 +0200, Ivar B. Jessen <nospam@nospam.com>  
wrote:


> It is not quite clear what the date format on the computer running the  
> code is.
>
> I would rather say that the date format on the computer is the date  
> format set
> in the OS, and in Windows 8.1 it is the date format set in the control  
> Panel ->
> Region. In this specific case, where we are dealing with the dateformat  
> in the
> entryfield on a dBase form, the date format is set by the commands 'Set  
> Mark to'
> and 'Set Date to', and that date format is the one used, irrespective of  
> 'the
> date format on the computer'.

The short date format set in Windows on my computer under Regional and  
Languages is yyyy/dd/mm.  The date format in dBASE is YMD.

For an empty date in an entryfield the form designer would normally stream  
out value = {    /  /  } on my computer.  In the sourcecode editor I  
changed this to {  -  -    }, which is the empty date you would use, and  
expected to be presented with the same skeleton in the entryfield when the  
form was opened.  Instead the skeleton, as shown in the screenprint, is  
for a date in the format yyyy/mm/dd.

Changing the SET DATE value to German results in the form showing a  
skeleton for dd.mm.yyyy although the skeleton in the sourcecode is still  
{  -  -    }.

Initially I told Robert that if the skeleton for an empty date in the  
constructor code didn't match the date format on the computer running the  
program the date entered would be corrupted.  This isn't true.  If the  
empty date skeleton in the constructor code is valid for any acceptable  
date format dBASE will display the setting appropriate for the computer  
running the form.

Mervyn.