473,513 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to show UK Date Format in Gridview using C# and Access mdb Database

106 New Member
in my c# application, I am storing to to an access 2003 Database (.mdb)

The strange things is that I started developing the application in April and all the April dates are showing as being correctly formatted to UK format.
however since start of May 2016, All the May Dates are reverting to US format and showing as March Dates in the application.

I am not sure if I have changed something in hind sight. nevertheless, I am not sure how to solve this problem.
below are the codes being used:

in SQL SELECT code, I am using the Format Statement
Expand|Select|Wrap|Line Numbers
  1. ... Format(InvoiceDate, 'DD/MM/YYYY') AS InvDate...
I am formatting the grid view in this manner
Expand|Select|Wrap|Line Numbers
  1.                 theGrid.Columns[7].HeaderText = "Date";
  2.                 theGrid.Columns[7].Width = 80;
  3.                 theGrid.Columns[7].ValueType = typeof(DateTime);
  4.  
Images from c# GridView and MS Access Query are attached.

All help is appreciated.
Attached Images
File Type: jpg accesquery.jpg (21.0 KB, 190 views)
File Type: jpg gridview.jpg (16.8 KB, 162 views)
May 4 '16 #1
0 1173

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

Similar topics

2
2824
by: Rahul | last post by:
Hey Guys I have a development environment, in which the whole SQL syntax is stored in the Database. So the syntax in the databse column could be "where BirthDate = '12/31/2005' and ID =...
0
2064
by: astersathya | last post by:
Date Format in MS Access using a query Hi I want to alter the existing column's format using the alter query. The issue I am facing is I want to set the default date format of an existing...
1
1842
by: Eglute | last post by:
Hello I want to show the results of MS Access database query in Visual basic. Do you know how to do this? I want to show the results in objects such as label or text box. Please help me. My code is:...
10
5787
by: ARC | last post by:
Hello all, General question for back-end database that has numerous date fields where the database will be used in regions that put the month first, and regions that do not. Should I save a...
2
1301
by: tooold | last post by:
I'm trying to create a field on a form which uses date format like dd/mm/yyyy. The problem is I don't want to change the system date and time format which is now mm/dd/yyyy. Any help would be highly...
1
4018
by: Cainnech | last post by:
Hello, I have a problem when I try to insert dates in my database. I want to insert a date range in my table in the dd/mm/yyyy format. When I insert for instance 01/05/2011 (1st of May) it...
6
4960
by: Paul Swanton | last post by:
Hi, I'm currently attempting to create a query in Access 2003 on a SQL database where I'm trying to format a date column, that's currently set as YYYYMMDD, to show as DD/MM/YYYY. Using that...
1
5787
by: Rekha Angappan | last post by:
I have to insert a date/time field in access database from my java code. But the date/time field format in DB is MM/DD/YYYY HH/MM/SS AM/PM.I tried the code below. DateTime date=new DateTime(); ...
0
7162
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
7384
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
7539
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...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3223
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1597
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.