473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Changing date format In MS access from d/mm/yyyy to ddmmyyyy

1
I need to change the format of the date in an MS access table from m/dd/yyyy to mmddyyyy. I just used the advice given here to remove the dashes from the ssn field and it work beautifully. is there a way to use the same update query to do both the dash removal from the ssn and reformat the date to mmddyyyy?
Sep 26 '16 #1
2 3585
PhilOfWalton
1,430 Expert 1GB
I think this may work, but can't be sure as there are problems with English and American date formats being different.

You also didn't mention how you are removing the slashes
Expand|Select|Wrap|Line Numbers
  1. Function ChangeDateFormat(DateIn As Date) As String
  2.  
  3.     ChangeDateFormat = CStr(Replace(Format(DateIn, "mm/dd/yyyy"), "/", ""))
  4.  
  5. End Function
  6.  
Phil
Sep 27 '16 #2
Narender Sagar
189 100+
If you change it in control panel/region & language. You will not be required to change it using any code.
Sep 27 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: jt | last post by:
I posted this yesterday, but I am not seeing this out yet: I am having problems with updating a date field in a certain format. The data is stored in an Oracle database. The date is...
3
by: Stefan van Roosmalen | last post by:
Hi there, I have developed several applications in Delphi. I used Paradox for my data storage. Now, I want to convert these databases to MySql. So that why I am looking for a way to convert the...
2
by: Chris | last post by:
Hello, i'm using a form with 2 dates in the format mm/dd/yyyy in it. I wanna calculate the days between the two dates. I tried it like this: <script language="JavaScript"> var date1 = new...
1
by: Gani Pola | last post by:
Can someone please tell me how I can change the date format (e.g dd/mm/yyyy, mm/dd/yyyy) in a configuration file? In my windows app, I can retrieve the windows setting but not my ASP.NET...
5
by: Terry Olsen | last post by:
I have a function that returns the date in the following format: 6/22/2005 I need the format to be: 050622 I have zero experience with RegEx but I believe that would be the way to go...
3
by: Tony WONG | last post by:
The date format (control panel) of testing (VS2005) and production platform are yyyy/mm/dd. i run preview from testing (VS2005). The date format is yyyy/mm/dd however, when i put the code to...
4
by: kuzen | last post by:
Hi When querying data in a table on date, an error is reported stating the data types do not match (error code 3464). The column format is short date, the query considers that and how short date is...
15
by: cephal0n | last post by:
I have a technical Date problem that's really difficult for me, I have a "custom made" Date format MM.DD.YY this is actually extracted from SAP and theirs no other format option offered such as...
2
by: deathal | last post by:
Hi I'm trying to make a list of dates between two dates and i found this http://bytes.com/forum/thread774887.html and used the code at the bottom to make the list but i need the list to output...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.