472,988 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Date Format MMDDYYYY

The date format mmddyyyy is common but I realize it's not a standard
format in Access. There must be a simple way to provide this format
to Access so it treats it as a date? In past, I play with it and do a
(Left MM, Mid, and Right Function) and add "/" so it's recognized.
There has to be a better way than this?? What I'd want to do is be
able to import the data directly into a date field, vs import into a
text and then transfer to a date field.
Nov 19 '07 #1
3 7871

Sub DateStuff()
Dim d1 As Date
d1 = #11/19/2007#
Debug.Print d1 '--this prints 11/19/2007
Debug.Print Format(d1, "mmddyyyy")
'-- this prints 11192007
End Sub
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '07 #2
On Mon, 19 Nov 2007 11:02:23 -0800 (PST), ve***@aol.com wrote:
The date format mmddyyyy is common but I realize it's not a standard
format in Access. There must be a simple way to provide this format
to Access so it treats it as a date? In past, I play with it and do a
(Left MM, Mid, and Right Function) and add "/" so it's recognized.
There has to be a better way than this?? What I'd want to do is be
able to import the data directly into a date field, vs import into a
text and then transfer to a date field.
If the field is a Date Datatype, simply set the Format property of the
control on your form to:
mmddyyyy
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Nov 19 '07 #3
On Nov 19, 4:35 pm, fredg <fgutk...@example.invalidwrote:
On Mon, 19 Nov 2007 11:02:23 -0800 (PST), ve...@aol.com wrote:
The date format mmddyyyy is common but I realize it's not a standard
format in Access. There must be a simple way to provide this format
to Access so it treats it as a date? In past, I play with it and do a
(Left MM, Mid, and Right Function) and add "/" so it's recognized.
There has to be a better way than this?? What I'd want to do is be
able to import the data directly into a date field, vs import into a
text and then transfer to a date field.

If the field is a Date Datatype, simply set the Format property of the
control on your form to:
mmddyyyy
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Thanks for suggestions above, but I'm actually referring to importing
the data into a table vs using it in a form. I'm importing a csv
table in which that field is text 8 char. Importing it into an Access
Date field formatted as mmddyyyy does not seem to work. I don't want
to import into a text field, as I am now, because then I cannot
calculate off of the date.
Nov 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: JamesBV | last post by:
My PC's Region setting is set to "English (Canada)"... cause I am in Canada (eh?) (: I'm using VB.net, standard edition (v1?) So I wrote my application based on this Region. I've both Short...
2
by: Fran Zablocki | last post by:
I need to convert one date that is in the format yyyymmdd to another date format that is mmddyyyy. I know this is probably a really simple thing to do, but I can't seem to get it right. Can I use...
6
by: Willie wjb | last post by:
Hi, i have a client program that sends a filter expression to the server PC. On that server PC this filter is put over a datatable and the result is send back. the server can be located on a...
5
by: Jack | last post by:
I am trying to format a DateTime object as mmddyyyy and NOT mm/dd/yyyy. What is the easiest way to do this?
2
by: Florida . NET Coder | last post by:
I am trying to format the system date in the MMDDYYYY format and am having troubles. Does anyone have a code sample for me? Thank you.
18
by: David Gacek | last post by:
I've tried several different ways all with the same reults. Invalid date Dim ddate As String ddate = "11/22/2004" Dim TryToConvert As Date = Date.Parse(ddate) Dim TryToConvert2 As Date =...
3
by: spdude | last post by:
I am working on an application that stores date in DOS format. For ex: 9540 which appears to be the number of days since 1980. Anyone knows a way to convert this into the mmddyyyy format? Thanks...
20
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
2
by: Stevienashaa | last post by:
Hello I'm using Access 2003, and I have a query (written in SQL) which has two parameters and asks the user for two dates. This has been working fine. Today I modified the query, removing the...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.