Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Convert string to date

Hi! I have a macro that prints a long series of dates on a worksheet. However
I cannot use these dates as proper dates in excel. Excel simply does not
understand that they are dates. Please help me solve this! Here is the code
when I print the dates (it is really in a loop but I left that code out).

Application.ThisWorkbook.Sheets("Settings").Cells( 6 + iq, 4) = strDate
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Convert string to date

Application.ThisWorkbook.Sheets("Settings").Cells( 6 + iq, 4) =
datevalue(strDate)

"Arne Hegefors" wrote:

Hi! I have a macro that prints a long series of dates on a worksheet. However
I cannot use these dates as proper dates in excel. Excel simply does not
understand that they are dates. Please help me solve this! Here is the code
when I print the dates (it is really in a loop but I left that code out).

Application.ThisWorkbook.Sheets("Settings").Cells( 6 + iq, 4) = strDate

Reply
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
Convert a string to a date? Terry Pinnell Excel Discussion (Misc queries) 3 September 24th 07 12:07 PM
VBA convert day and date from text string to Excel date Max Bialystock[_2_] Excel Programming 5 May 14th 07 04:54 AM
Convert Date to STring tonymaguire Excel Discussion (Misc queries) 9 February 15th 06 11:33 AM
How to convert string to a date galsaba Excel Worksheet Functions 3 March 4th 05 05:20 PM
Convert Date to String Michael168[_31_] Excel Programming 1 October 7th 03 10:44 AM


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

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

About Us

"It's about Microsoft Excel"