Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
get actual date from variable text string
Richard,
Excel will generally accept date in many formats, with a suitable separator. As Jon pointed out, 113006 would be a problem as it appears to be just a number (or text). However, you will have trouble with dates where the day is not unambiguous e.g. <13. For this, you will have to process it yourself (Left,Mid,Right) and DateSerial. If you cannot tell if say 12/10/2007 falls in December or October, Jon's Option 2 is the solution. If possible, provide the user with a UI (possibly with a calendar control) to ensure consistent date/data entry and avoid this mess. NickHK "Richard" wrote in message ... I'm importing dates that are from a text field filled in by numerous people, so it could be in a host of formats. e.g. 30-Nov-06 or 113006 or 11/30/2006 or November 30th, 2006. How can I convert to true Excel Date format? (I realize there may be no macro that gets it right all the time.) -- Richard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text strings from a variable string | New Users to Excel | |||
find a variable text string | Excel Discussion (Misc queries) | |||
get actual date from variable text string | Excel Programming | |||
Getting text file into a VBA string variable | Excel Programming | |||
& reference answering as Date Serial # not actual text | Excel Worksheet Functions |