# access & sql date formating

**URL:** <https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915>\
**Category:** Coding and Design\
**Created:** [12 December 2007 09:51 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915 "2007-12-12T09:51:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damski](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@Damski](https://forums.teamphoenixrising.net/u/Damski)\
**Post date:** [12 December 2007 09:51 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/1 "2007-12-12T09:51:23Z")

</div>

I know someone out there will be able to help me, so here go’s

I have an access database, with date entry fields, when I press a button on the form It uses an sql insert command to throw the data into a table, it was all working fine until I was given a new profile, it now screws the dates about, it should be dd/mm/yy I can see it’s being fed into the SQL command corectly as I can see it in the imediate window, but when it ends up in the table it’s yyyy/mm/dd, I can’t see where to change it , I know it’s related to my regional settings but I don’t have rights on this machine to change it.

Someone help, I’m unable to do a big chunk of my work till it’s fixed and the IT section here are crap!

---

<div class="post-metadata">

**Author:** ![Speedo](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@Speedo](https://forums.teamphoenixrising.net/u/Speedo)\
**Post date:** [12 December 2007 16:01 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/2 "2007-12-12T16:01:45Z")

</div>

What’s the date format set to in your regional settings? I know access has a habit of changing the date format to that of your regional settings regardless of whether you force it or not.

---

<div class="post-metadata">

**Author:** ![Damski](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@Damski](https://forums.teamphoenixrising.net/u/Damski)\
**Post date:** [13 December 2007 09:50 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/3 "2007-12-13T09:50:32Z")

</div>

here’s the doozy, I can’t get to the regional settings on this machine, I’m down to being just a user so don’t have access rights. I think the regional settings are wrong which is why I’m getting the error, either that or the regional settings being pushed by the DC are set to US

---

<div class="post-metadata">

**Author:** ![DoubleTop](https://forums.teamphoenixrising.net/user_avatar/forums.teamphoenixrising.net/doubletop/32/4_2.png) [@DoubleTop](https://forums.teamphoenixrising.net/u/DoubleTop)\
**Post date:** [13 December 2007 11:52 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/4 "2007-12-13T11:52:49Z")

</div>

is it going into the sql wrong causing issues with applications when reading the date, or are they coping. If they are not coping and you have access to them, just do a FORMAT(%s, “DD/MM/YYYY”) on read from the table.

Of course, I may have completely misunderstood the issue.

DT.

---

<div class="post-metadata">

**Author:** ![Damski](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@Damski](https://forums.teamphoenixrising.net/u/Damski)\
**Post date:** [13 December 2007 12:24 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/5 "2007-12-13T12:24:07Z")

</div>

you have 100% right, the problem being, I’m not actualy using sql just an sql insert into from within access so using the format function won’t work

---

<div class="post-metadata">

**Author:** ![STEP2000](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@STEP2000](https://forums.teamphoenixrising.net/u/STEP2000)\
**Post date:** [13 December 2007 14:07 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/6 "2007-12-13T14:07:46Z")

</div>

The Format command will not work if he regional settings are set to a different format.  
Now you could do this:

Make that Table Point a Text Field

Then you will be able to send anything into that. If you are using it for calc’s on other pages/forms then that will need to be tweaked. I had this happen one time where the stupid ADMIN of the international company just couldn’t understand the issue of DATE formatting.

I also remember a regedit hack for changing it but wow I guess a Google would handle that.

---

<div class="post-metadata">

**Author:** ![Speedo](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@Speedo](https://forums.teamphoenixrising.net/u/Speedo)\
**Post date:** [13 December 2007 14:12 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/7 "2007-12-13T14:12:56Z")

</div>

Can you perhaps format it in VBA before it goes into the SQL statement? Or bonk one of the IT guys over the head until he changes the regional settings on your computer?

---

<div class="post-metadata">

**Author:** ![STEP2000](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@STEP2000](https://forums.teamphoenixrising.net/u/STEP2000)\
**Post date:** [13 December 2007 23:00 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/8 "2007-12-13T23:00:09Z")

</div>

[http://www.windowsdevcenter.com/pub/a/oreilly/windows/ron/short\_date.html](http://www.windowsdevcenter.com/pub/a/oreilly/windows/ron/short_date.html)

Here ya go…

---

<div class="post-metadata">

**Author:** ![Damski](https://forums.teamphoenixrising.net/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@Damski](https://forums.teamphoenixrising.net/u/Damski)\
**Post date:** [14 December 2007 16:46 UTC](https://forums.teamphoenixrising.net/t/access-sql-date-formating/15915/9 "2007-12-14T16:46:25Z")

</div>

I ended up doing it the long way, I had a form that had data entry areas, both submitting to diferent tables, I just had butons that did the insert. I’ve now created a pair of subforms that relate directly to the tables so no need for the sql command and so problem worked arround
