Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim NewDate as Date
Dim cell as Range, sStr as String set cell = ActiveCell NewDate = cDate(Mid(cell,3,2) & "\" & Left(cell,2) & "\" & Right(cell,2)) sStr = format(NewDate,"dd/mmmm/yyyy") -- Regards, Tom Ogilvy "ajliaks" wrote in message ... Hi all, I have a list of numbers, and I need to sort them as date. for example: 281100 == must be 28/november/2000 110303 == must be 11/march/2003 271004 == must be 27/october/2004 I am trying to convert these numbers into dates, and sorting them, but getting errors in the translation, for example, if I try NewDate=CDate(110303), I get 30/December/2201 instead of 11/November/2003 Could anybody help, please? Thanks in advance, Aldo. -- ajliaks ------------------------------------------------------------------------ ajliaks's Profile: http://www.excelforum.com/member.php...fo&userid=8196 View this thread: http://www.excelforum.com/showthread...hreadid=272786 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting Number to Date | Excel Discussion (Misc queries) | |||
Converting a number to a date | Excel Discussion (Misc queries) | |||
converting date to number | Excel Worksheet Functions | |||
converting 8-digit number to date | Excel Discussion (Misc queries) | |||
converting a number to a date | Excel Programming |