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

  • Home
  • SEARCH
  • 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 8567677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:56:11+00:00 2026-06-11T17:56:11+00:00

I am strongly typing my DataTable DateTime columns and then transforming the DataTable into

  • 0

I am strongly typing my DataTable DateTime columns and then transforming the DataTable into an Object[,] and pasting into Excel. My problem is that in some cases the date shows in US format and in others UK format. What is the standard practise for doing this operation and making sure that the correct date is pasted down but also maintaining the type of the column?

  • 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-11T17:56:12+00:00Added an answer on June 11, 2026 at 5:56 pm

    With C# Excel Interop, you can set the Format of a cell or a range of cells with the NumberFormat property.

    This is just a string, and is the same thing that you would type into Excel if you right clicked on a cell, or a range of cells and selected the Custom category, and then typed in a format.

    You could ensure that a Date in a cell always has the same format by simply doing the below:

    range.Value = DateTime.Now.ToOADate();
    range.NumberFormat = "dd/mm/yyyy";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have an strongly typed object that represents all of the textbox properties of
I have some code for strongly typing Includes()'s in linq, like so... public static
I am trying to strongly type an object property that has been defined as
I strongly suspect that this boils down to me needing to understand some language
For strongly-typed & type-safe solution, I have to do the following step. Create some
I have a strongly typed DataTable created with the VS2005/VS2008 DataSet designer. The table
I'm strongly considering adding unit testing to an existing project that is in production.
I'm working on a framework that I'm trying to type as strongly as I
In views i`m passing model strongly typed way like this: System.Web.Mvc.ViewPage<HomeModel> And then just
Am using strongly typed view to show a complex object in a data entry/edit

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.