![]() |
|
#1
|
|||
|
|||
![]()
Hi
I designed an Excel app, which did read client forecasts from Excel file. Until now client's column headers for forecast quantities were in format 'Forecast mm', i.e. like 'Forecast 07'. The starting year was read from file name, and whenever next month number was less than previous, 1 was added to forecast year. The day of forecast date was determined by app's Setup. Now the client did change the format of those headers. The new format for header is 'Forecast mmmm yyyy', i.e. like 'Forecast July 2024' (month names are in english). My problem is, that employee working with app may have non-english/non-US local settings for Windows, and I cold't find any info, how will VBA work then. Will e.g. Datevalue('July 28, 2024') recognized as date, when user's local setting is not english or US (as example the same date in my local format may be '28. juuli 2024.a.' instead, and I haven't any clue what it may be in local format for possible users - the app is used in another country, and different users may have different local settings set up also)? Or are Date formats used in Datevalue() limited to english language only, and are not affected by local settings? |
#2
|
|||
|
|||
![]()
Btw, I tested in watches window, and DateValue("July 1, 2024") returned an error! DateValue("1. juuli 2024") did work!
Is there a way to force Datevalue() to accept any US format with full month name in it, regardless of local date settings? |
#3
|
||||
|
||||
![]()
A bit hard without seeing a sample workbook and code.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]()
I simply added a Select Case statement to get month numbers instead month names.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel reading date incorrectly | sam123456 | Excel | 1 | 02-12-2022 12:39 AM |
Date formatting on String field | neubs007 | Mail Merge | 1 | 12-13-2021 10:12 PM |
Extracting date, month & year from a text string without using date format Help | Haha88 | Excel | 5 | 08-06-2021 01:19 PM |
Microsoft Excel to extract date from another string | Rajeshwar | Excel | 1 | 10-26-2016 09:57 AM |
![]() |
ItzVickey | PowerPoint | 2 | 08-08-2012 09:23 AM |