PC Review


Reply
Thread Tools Rate Thread

Dates Being displayed the wrong way around.

 
 
NateBuckley
Guest
Posts: n/a
 
      13th Apr 2008
Hello, Everyone.

I'm having more problems with dates, I'm reading in dates from a
Spreadsheet, and it's swtiching the day and the month around

so the format should be DD/MM/YY (If the order appears Alien it's because
i'm from from the UK )

In my spreadsheet I have 01/05/08

when I read it into the msgBox it displays as 05/01/08

The following code snippit is to show you how I do it.

MsgBox sht.Cells(i, 6).Value

sht is a variant I SET to Sheets("HOLData").



 
Reply With Quote
 
 
 
 
Mark Ivey
Guest
Posts: n/a
 
      13th Apr 2008
Here are some formatting features you might find useful....

Mark Ivey

Note: you can replace the "Range("A1")" with the cell reference you were
using if you prefer



MsgBox Range("A1").Value

MsgBox Format(Range("A1").Value, "MM/DD/YY")
MsgBox Format(Range("A1").Value, "DD/MM/YY")
MsgBox Format(Range("A1").Value, "DDD MM/DD/YYYY")
MsgBox Format(Range("A1").Value, "DDD MMM DD YYYY")
MsgBox Format(Range("A1").Value, "DDD MMMM DD YYYY")

 
Reply With Quote
 
NateBuckley
Guest
Posts: n/a
 
      13th Apr 2008
Cheers, for some reason a restart fixed the problem :S weird, but I
appreciate the list of different Formats you presented. I shall give them a
whirl.

Thanks again!

"Mark Ivey" wrote:

> Here are some formatting features you might find useful....
>
> Mark Ivey
>
> Note: you can replace the "Range("A1")" with the cell reference you were
> using if you prefer
>
>
>
> MsgBox Range("A1").Value
>
> MsgBox Format(Range("A1").Value, "MM/DD/YY")
> MsgBox Format(Range("A1").Value, "DD/MM/YY")
> MsgBox Format(Range("A1").Value, "DDD MM/DD/YYYY")
> MsgBox Format(Range("A1").Value, "DDD MMM DD YYYY")
> MsgBox Format(Range("A1").Value, "DDD MMMM DD YYYY")
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Username is wrong displayed =?Utf-8?B?bW9ycGhldXM=?= Microsoft Outlook Printing 0 26th Apr 2007 04:16 PM
Wrong cw displayed =?Utf-8?B?VGhvbWFzIFNlZGxhY3plaw==?= Microsoft Outlook Calendar 2 25th Oct 2006 02:25 PM
wrong characters being displayed Mike Windows XP Help 3 30th May 2005 09:24 PM
Wrong icons being displayed =?Utf-8?B?Z29sZGo=?= Windows XP Help 4 25th May 2004 09:15 PM
Wrong web site displayed =?Utf-8?B?UmFsZg==?= Windows XP Internet Explorer 4 4th Feb 2004 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:52 AM.