date format problem

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

date format problem

Postby lilyed72 » Mon Dec 27, 2010 1:30 am

I require a date formatted as "dd/mm/yyyy" regardless of culture, and have tried the following with the current date.

The current date is 18/10/2010 i.e. 18th October 2010.
Both of the following formatting attempts end up with a result of "18/00/2010", not "18/10/2010" as expected i.e. the month is being set to "00", not '10" as it should be.

Why is this happening? it is driving me crazy. :x

Dim DateString as string
DateString = Date.Today.ToString("dd/mm/yyyy")
DateString = String.Format("{0:dd/mm/yyyy}", Date.Today)
Posts: 5
Joined: Mon Dec 27, 2010 1:24 am

Re: date format problem

Postby iceblue support » Mon Dec 27, 2010 8:50 am

mm is minutes.

MM is Months.
e-iceblue support
User avatar
iceblue support
Posts: 244
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 0 guests