+ Reply to Thread
Results 1 to 2 of 2

Override locale settings for dates when sending to SQL table?

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Override locale settings for dates when sending to SQL table?

    Hello - I've built a workflow tool for some users here in the US, which is working quite nicely. However, we are now expanding its user base to some offices in Europe and Asia and I've bumped into a problem I'm hoping somebody here can help with.

    Part of the workflow requires an update to a sql table, and that update includes the current date. In SQL (MSFT SQL Server Manager), the field is defined simply as a "Date" type.
    When the users in our European or Asian offices try to execute that update, SQL rejects it because the formatting is unrecognized. I've tried updating the formats in the front end (Excel) to a US based version (mm/dd/yyyy), but when it sends to SQL, it reverts back to their locale settings.

    I've tried changing the SQL field from "Date" to "Varchar" so I can send the dates as a string, but then all of the reports I've built in (which use the month and year date parts) fail.

    So ultimately the question is -- is there a way to override the locale settings temporarily? I assume there is some registry setting, but I've not been able to find and manipulate it on my own.

    Thank you for any help/guidance!

  2. #2
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Override locale settings for dates when sending to SQL table?

    Solved my own problem. Essentially, I take the date and split it apart into month, day, year, then join each one back together in a string.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TEXT function date formatting for different locale settings
    By Szczesiu in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-12-2017, 04:13 AM
  2. [SOLVED] Need a lookup to extract data table based on four criteria & override user input
    By Marvelous in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-01-2013, 12:54 PM
  3. Replies: 3
    Last Post: 07-17-2013, 06:14 PM
  4. [SOLVED] VBA Excel Chart DateFormat Language Settings Locale
    By Marabu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2006, 07:20 AM
  5. Pivot Table - Default Settings for Table Options
    By Nacho in forum Excel General
    Replies: 0
    Last Post: 02-25-2005, 02:06 PM
  6. [SOLVED] override locale computer settings
    By n.almeida in forum Excel General
    Replies: 3
    Last Post: 02-18-2005, 10:06 AM
  7. [SOLVED] override language settings on date
    By n.almeida in forum Excel General
    Replies: 0
    Last Post: 02-15-2005, 11:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1