Date in CAPS

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
 
T

Tangier

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

Rick Rothstein

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

Héctor Miguel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top