I've got a cell with a date that the user types in. Currently, the
user types a date in and it automatically changes the format to
DDMMMYYYY.
I need the MMM to be in all caps so that it feeds a SQL string
correctly but can't find a way to do this.
Any suggestions is appreciated.
Mark
On Aug 29, 1:43 pm, "Mark.M.Swee...@gmail.com"
<Mark.M.Swee...@gmail.com> wrote:
> I've got a cell with a date that the user types in. Currently, the
> user types a date in and it automatically changes the format to
[quoted text clipped - 6 lines]
>
> Mark
one question is why does your date mask have MMM instead of MM?
Rick Rothstein - 29 Aug 2008 22:18 GMT
Using 2 M's lists the month number with two digits (leading zero where
necessary), using 3 M's lists the abbreviated name of the month (and using 4
M's would list the month's full name).

Signature
Rick (MVP - Excel)
On Aug 29, 1:43 pm, "Mark.M.Swee...@gmail.com"
<Mark.M.Swee...@gmail.com> wrote:
> I've got a cell with a date that the user types in. Currently, the
> user types a date in and it automatically changes the format to
[quoted text clipped - 6 lines]
>
> Mark
one question is why does your date mask have MMM instead of MM?
hi, Mark !
> I've got a cell with a date that the user types in.
> Currently, the user types a date in and it automatically changes the format to DDMMMYYYY.
> I need the MMM to be in all caps so that it feeds a SQL string correctly but can't find a way to do this.
> Any suggestions is appreciated.
*IF* your SQL string is built by code... try enclosing "the cell" within vba function UCase(<the_cell>.Text)
otherwise, see Stephen Bullen's: http://www.bmsltd.co.uk/ExcelProgRef/Ch22/ProgRefCh22.htm
for working with dates between excel, regional settings, user customes, ...
hth,
hector.