Date in CAPS

  • Thread starter Thread starter Mark.M.Sweeney
  • Start date Start date
M

Mark.M.Sweeney

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
 
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

one question is why does your date mask have MMM instead of MM?
 
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).

--
Rick (MVP - Excel)


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

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.
 
Back
Top