The user sets the display format of dates via their control panel. Your application needs to have the ability to translate what they enter into a standard date-time variable. If I were a user of your app, and you were to change my date format without my permission, I would regard your application as being defective.
In order to get the user to enter dates in a way that can more easily be stored in a date-time variable, there are three main techniques:
1) Use a date-time specific control (the best way). Microsoft's DateTimePicker falls into this category. Only drawback to this is you don't have the ability to *not* enter a date (you can't leave it blank to skip it).
2) Use a masked-edit control. This restricts the user to only entering numeric values, and can prompt them to enter dates in the correct format, but can't enforce it. You would have to write additional code to validate what they typed in. You still would have the problem of telling Jan 2nd from Feb 1st. Using ordinary textboxes fall into this category too.
3) Use separate controls for day, month & year. Most awkward to use, but is unambiguous so far as telling your months from your days.
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first