Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8694805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:52:23+00:00 2026-06-13T00:52:23+00:00

I have a gridview with 3 columns, in database the date field of the

  • 0

I have a gridview with 3 columns, in database the date field of the origin table isn’t stored as a date format (the table is in oracle), is stored in string format, so I have my datasource in asp like this

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:OracleXexdb %>" 
        ProviderName="<%$ ConnectionStrings:OracleXexdb.ProviderName %>"

        SelectCommand="select to_date(date, 'mm/dd/yyyy') as date, user, description from mytable where user is not null"
         filterexpression = "user LIKE '%{0}%'"
         >

    </asp:SqlDataSource>

As you can see in the SelectCommand, I convert the date field with the format dd/mm/yyyy (in the database the date format is mm/dd/yyyy); when I run my webpage in the asp.net development server everything is fine, I mean I see the date field with the format dd/mm/yyyy but when I put the webpage on the server I see the mm/dd/yyyy format.

Is there anything I can do? thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:52:24+00:00Added an answer on June 13, 2026 at 12:52 am

    The most likely reason for the difference when deploying the application is that the culture that will be picked up will be different.

    Setting the culture explicitly to the needed one in the Web.config file system.web globalization configuration or on the current thread should resolve the problem.

    For example: See Example in Comment Below

    The date format can also be specified explicitly on the DatePicker by using the Format method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Gridview <asp:GridView ID=GridView1 runat=server Width=400px AutoGenerateColumns=false OnSelectedIndexChanged=GridView1_SelectedIndexChanged1> <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox
Grid View Data Bind i have a database table with 4 columns having data
I have a GridView with some columns. If exist a value in my database,
I have a GridView , which is bound to a database table. This GridView
I have GridView: <asp:GridView ID=MyGridView runat=server ShowFooter=true AutoGenerateColumns=False Visible=True> <Columns> <asp:BoundField DataField=id ItemStyle-HorizontalAlign=center/> <asp:BoundField
Im working on asp.net with c#. I have a gridview with templatefield columns, data
I have a gridview connected to database using sqldatasource. There is a datetime field
I have a GridView like this <asp:GridView ID=gv_FilesList runat=server AutoGenerateColumns=false onrowcommand=gv_FilesList_RowCommand> <Columns> <asp:BoundField DataField=f_Id
I have a GridView with 10 columns. On a certain condition, I want to
I have a gridview with couple of columns,I want to achieve the following: If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.