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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tasawer
    New Member
    • Aug 2009
    • 106

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

    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
    Code:
    ... Format(InvoiceDate, 'DD/MM/YYYY') AS InvDate...
    I am formatting the grid view in this manner
    Code:
                    theGrid.Columns[7].HeaderText = "Date";
                    theGrid.Columns[7].Width = 80;
                    theGrid.Columns[7].ValueType = typeof(DateTime);
    Images from c# GridView and MS Access Query are attached.

    All help is appreciated.
    Attached Files
Working...