[AccessD] All-In-One Date format Function:

David McAfee davidmcafee at gmail.com
Wed Oct 21 15:03:22 CDT 2009


I also agree that a calander control is best, with an input mask 2nd best.

Now, with that out of the way, I'd recommend either a 4 or 5 digit field.

Make an entry such as 9/09 be entered as 0909 or as 09/09, still very
fast once they are used to it (using the numeric keypad).
Also enable the autocomplete.

I did this for a lotto entry screen I made. you can enter all of the 6
numbers (12 digits) really quickly.

David




On Wed, Oct 21, 2009 at 12:18 PM, Robert <robert at servicexp.com> wrote:
> Thanks for the reply Lambert,
>  The great thing is, I don't have to worry about in what order the date is
> entered. Currently all dates are entered in "09/21/09" format. The request
> is "we would like to minimum keystrokes (see below) and have the users enter
> the date as 0909 for CC and 092109 for all other date fields.  (I want to
> parse the date and format it correctly to protect against 909 or 32109.. etc
> entries...
>
>  The owner want the fastest possible key entry to his employees. Reaching
> for a mouse is not an option here..;-)
>
> Even if I did have to worry about the date order, I should be able to format
> the end entry to the system formatting very easily right?, it's the parsing
> that's the challenge.. :-)
>
> Thanks Again
>
> WBR
> Robert
>
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert
> Sent: Wednesday, October 21, 2009 2:49 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] All-In-One Date format Function:
>
> Robert,
>
> If you would like to remain sane they I suggest you step away from the
> problem. "I would like the user to enter it the way they want to" is just
> not a good idea. What if your company hires a Brit who wants to enter
> 10/1/09 - meaning January 10th 2009? Or a Japanese who enters 10/01/09 but
> means January 9th 2010?
>
> To me, the simplest solution to managing date input is to not permit
> freeform entry, but rather to pop up a small calendar form any time a Date
> field is clicked on.
>
> As for a routine to convert existing freeform dates? I don't think you can
> beat Cdate([YourData])
>
> Cdate can handle just about anything that looks like a date and if it's
> unambiguous will give you a real date back. It will of course assume
> mm/dd/yyyy when the input data is not clear. Just another reason NOT to
> allow freeform date entry. Feed it really weird input like 92109 and you
> will get back 3/7/2152, because that date is 92,109 days after 12/30/1899 -
> the basis of Access dates.
>
> Doing any better than this is going to require various assumptions to be
> coded regarding what comes first a month a day or a year. Why have the
> problem to deal with? Use a calendar form.
>
> Lambert
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert
> Sent: Wednesday, October 21, 2009 2:17 PM
> To: 'Access Developers discussion and problem solving'
> Subject: [AccessD] All-In-One Date format Function:
>
> Hoooooowdy,
>  Before re-inventing the wheel here, does anyone have or know of a function
> that can handle "free form" date formatting. I'm looking for a function that
> can parse any input and then format is correctly.
>
> Example of user inputs:
>
> 0909
> 09/21/09
> 09-21-09
> 092109
> 92109
> 9212009
>
> etc.
>
> I don't want to use any formatting / Masking settings at the field or table
> level. I would like the user to enter it the way they want to (to the most
> degree possible)...
>
> WBR
> Robert
>




More information about the AccessD mailing list