ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert string to date (https://www.excelbanter.com/excel-programming/400071-convert-string-date.html)

Arne Hegefors

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

joel

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



All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com