LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Convert a yyyymmdd date format in code

How does one in VBA code convert a date with format yyyymmdd (eg today's
date = 20110505) to a date recognized by Excel. I tried ConvertedDate =
Application.Worksheetfunction.Date(Left(InputDate, 4),Mid(Inputdate,5,2),Right(InputDate,2))
but that does not work. It would be easy enough in the spreadsheet, but in
VBA?
Thanks
Laurence



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
need to convert microsoft date to yyyymmdd pm Excel Discussion (Misc queries) 3 May 14th 23 11:43 AM
how do I convert date format yyyymmdd to mm/dd/yyyy Datahead Excel Worksheet Functions 3 May 11th 23 11:45 AM
How do I change date yyyymmdd to a Excel-supported date format? dan Excel Worksheet Functions 4 July 6th 08 11:05 PM
convert date (YYYYMMDD) to weeknumber mark paul Excel Worksheet Functions 1 February 27th 07 12:05 PM
yyyymmdd date format German Velasquez Excel Programming 11 November 30th 04 02:42 AM


All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"