473,378 Members | 1,377 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,378 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 7884

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.