473,394 Members | 1,722 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,394 software developers and data experts.

how to insert date format into access 2003

chandru8
145 100+
hi to all
iam using vb6.0
can any one correct me

the query which below mentioned is correct

strSql = "Insert into table1 values (#" & Date & "# ,'2')"
Set rs = objCon.Execute(strSql)

or
the date format has to send like a string
strSql = "Insert into table1 values ('" & de & "' ,'2')"
Set rs = objCon.Execute(strSql)
Apr 14 '08 #1
9 4078
jeffstl
432 Expert 256MB
hi to all
iam using vb6.0
can any one correct me

the query which below mentioned is correct

strSql = "Insert into table1 values (#" & Date & "# ,'2')"
Set rs = objCon.Execute(strSql)

or
the date format has to send like a string
strSql = "Insert into table1 values ('" & de & "' ,'2')"
Set rs = objCon.Execute(strSql)
I am pretty sure for Access the correct format is

Expand|Select|Wrap|Line Numbers
  1. strSql = "Insert into table1 values (#" & Date & "# ,'2')"
  2.  Set rs = objCon.Execute(strSql)
  3.  
If you get an error using that please post, but I think that is correct.
Apr 14 '08 #2
chandru8
145 100+
am not getting error i need to use this access in multi user format so the date format is changing according to the reginal setting is there any way to generalise the date format
Apr 15 '08 #3
lotus18
866 512MB
am not getting error i need to use this access in multi user format so the date format is changing according to the reginal setting is there any way to generalise the date format
Try the format function.

Rey Sean
Apr 15 '08 #4
chandru8
145 100+
i tried that also up 01/04/2008(dd/mm/yyyy) to 12/04/2008(dd/mm/yyyy)
its saving in the access as 04/01/2008 ,04/02/2008 .....04/12/2008

after 12
1st saving 13 th date as
13/04/2008
14/04/2008
.
.
.
31/04/2008

i used format function

and also
de = Format(DateSerial(Year(Calendar1.Value), Month(Calendar1.Value), Day(Calendar1.Value)), "mm/dd/YYYY")
strSql = "Insert into table3 values (#" & de & "#)"
Set rs = objCon.Execute(strSql)


is there any way to specify the general format in msaccess 2003

thanks
Apr 15 '08 #5
lotus18
866 512MB
So you are using 'Short Date' format in your access?

Rey Sean
Apr 15 '08 #6
chandru8
145 100+
i tried to change the format what my regional settings have
but the value is swaping up to 12
Apr 15 '08 #7
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2. Dim mydate
  3.     mydate = Format(Date, "DD-MM-YYYY")
  4.     MsgBox "" & mydate
  5. End Sub
  6.  
  7.  

try to play around with this in your VB 6 for your date format
Apr 15 '08 #8
chandru8
145 100+
Have You Understand My Problem

The Problem Is Not With Vb6.0 And I Know About The Format Statement

The Problem Is
How To Store Our Desired Format Without The Regional Settings Date Format
Apr 15 '08 #9
chandru8
145 100+
Any One Correct Me
Can I Declare That Date Data Type As Text

If I Declared As Text It Will Satisfies All The Calculation What We Do For The Date



Its Urgent Iam Doing This For Two Days
Thanks
Apr 15 '08 #10

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

Similar topics

1
by: PhilM | last post by:
Kindly break out the 4x2 and bring me to my senses. I seem to have gotten myself totally confused with php.net, mysql.org pages on dates etc, as well as groups.google. Could someone explain,...
0
by: Ray | last post by:
Date problem. Using non American date formats with Microsoft Access and Visual Basic. I set my regional settings to English(Ireland) or English(United Kingdom) and my date appears in Access as...
16
by: jason | last post by:
I'm tearing out my hair here: ACCESS 2000: When I attempt to overwrite a date in my date field with a new user selected valid date eg: 05/23/99 my date field changes to the TIME I updated the...
1
by: Shaiboy_UK | last post by:
Hi All, Sorry if this is the wrong newsgroup to post into, on this topic, if so, please point me in the right direction..... Currently working on a ASP for a friend, which requires the date...
0
by: ImraneA | last post by:
Hi there I had pleasure of upsizing Access v97 db to Access v2K/SQL 2K. Wish to provide some knowledge gained back to community - hopefully help others. 1.Question how do you test stored...
3
by: Nathan Bloomfield | last post by:
I am having difficulty filtering dates for a report. I have written the following code on a popup form which works with regular date fields , however, I am now trying to apply the same concept to...
3
by: captain | last post by:
Below is the sql for data with same date need to extract + or - 5 days data of same date also. How to also get data of + and - days related to same date. SELECT IM.Area, IM.Location,...
3
by: Lyn | last post by:
Hi, I am developing a project in which I am checking for records with overlapping start/end dates. Record dates must not overlap date of birth, date of death, be in the future, and must not...
3
by: Tom | last post by:
In a JET db using ACCESS, I specify a field Data Type as Date/Time and the Format as Short Date. These dates appear as 1/3/2003, 3/31/2003 ..... in Access which is fine since I don't want the time....
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
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: 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.