![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: Australia
Posts: 43
|
I have a spreadsheet which writes info to an Oracle database that is supersensitive to date formats. My spreadsheet runs fine on my PC because in Windows Control Panel, Regional settings I have the format set to: dd-mm-yyyy
I am about to let other people start using this spreadsheet however if they don't have the correct date format on their PC the data gets written to the wrong locations in the Oracle database (and I get a good hard spanking from the boys in the IT dept!). My questions are: 1. Is there any way of checking what a user's regional setting is for date so that I can display a warning message if necessary? 2. Is there any way of changing the date format from within Excel? Thanks. Penfold |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Function MakeDate(x As Variant) If Not IsDate(x) Then Exit Function MakeDate = Day(x) & "/" & Month(x) & "/" & Year(x) MakeDate = Format(MakeDate, "dd/mm/yyyy") End Function _________________ Kind Regards, Ivan F Moala http://<font color="green"><a href="...r Construction [ This Message was edited by: Ivan F Moala on 2002-04-15 04:39 ] |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|