473,325 Members | 2,480 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,325 software developers and data experts.

i had a problem in the date format

chandru8
145 100+
hi to all
i am using vb6.0 and msaccess 2003

iam inserting date like the query mentioned below
strSql = "Insert into table1 values (#" & Date & "# )"

the problem is ..,

for the 1ST date if april it inserted like 04/01/2008

so i changed the properties in the msaccess table .After that also its saving like that only i thought the msaccess took the date format as mm/dd/yyyy

but after 10 th date of april

its inserting like 10/04/2008

i dont know what to do

can any one help in this .


its urgent

thanks in advance
Apr 14 '08 #1
6 1208
debasisdas
8,127 Expert 4TB
You need to foramt the date before processing in database.
Apr 14 '08 #2
chandru8
145 100+
i have done that also my sys format is dd/mm/yyyy
up to 12 the format is mm/dd/yyyy
after that it changing like 13/04/2008
Apr 14 '08 #3
chandru8
145 100+
date
1/4/2008
2/4/2008
3/4/2008
4/4/2008
5/4/2008
6/4/2008
7/4/2008
8/4/2008
9/4/2008
10/4/2008
11/4/2008
12/4/2008
4/13/2008
4/14/2008
4/15/2008
4/16/2008
4/17/2008
4/18/2008




iam getting the date like this can any one help me
Apr 14 '08 #4
lotus18
866 512MB
date
1/4/2008
2/4/2008
3/4/2008
4/4/2008
5/4/2008
6/4/2008
7/4/2008
8/4/2008
9/4/2008
10/4/2008
11/4/2008
12/4/2008
4/13/2008
4/14/2008
4/15/2008
4/16/2008
4/17/2008
4/18/2008

iam getting the date like this can any one help me
The date format in your access and in your sql statement should be in the same format (mm/dd/yyyy).

Rey Sean
Apr 14 '08 #5
chandru8
145 100+
my sys date format is mm/dd/yyyy
but some of my user machines date format is different i dont know how to use the generalised date format
Apr 14 '08 #6
lotus18
866 512MB
my sys date format is mm/dd/yyyy
but some of my user machines date format is different i dont know how to use the generalised date format
There's no problem with that. Just format the date like this:

Expand|Select|Wrap|Line Numbers
  1. strSql = "Insert into table1 (YourFieldName) values (#" & format(Date, "mm/dd/yyyy") & "# )"
  2.  
Rey Sean
Apr 14 '08 #7

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

Similar topics

15
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
2
by: amith | last post by:
hi I have written javascript for comparing two dates in US format and finding out whether the start date is greater than the end date and vice versa. In this attempt i have instantiated the...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
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...
5
by: Macca | last post by:
Hi, I have a table which has a date/time field. I am storing them as follows :- 01/01/2005 11:25 01/01/2005 19:44 02/01/2005 05:04
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
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...
30
by: fniles | last post by:
On my machine in the office I change the computer setting to English (UK) so the date format is dd/mm/yyyy instead of mm/dd/yyyy for US. This problem happens in either Access or SQL Server. In the...
4
by: OzNet | last post by:
I have some functions to calculate the working days in a given period. This includes a table that is queried to calculate the number of public holidays that don’t occur on a weekend. If I test...
11
ollyb303
by: ollyb303 | last post by:
Hello, I am using a dynamic crosstab report to track performance statistics for my company and I have hit a problem. I would like the option to track stats daily (for the last 7 complete...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.