Date format in VBA

M

Muriel F.

Hello,

In a VBA module, I set a date as #12/01/04# that means in french 12th of
january 2004 .
MS Project understand 1st of december 2004, while I have in the Setting
Panel, Local...(Win2000) the date format "dd/mm/yy"

Thanks for help,

Muriel
 
R

Rod Gill

Hi,

VBA works behind the interface, so all dates are US format by default. One
way around this is to use things like:
cdate("2003-1-12") Year-Month-Day is the safest format to use. I use it for
all VBA, OLEDB and SQL Server code. It avoids all international date format
problems.

--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
 

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