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 8173637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:14:09+00:00 2026-06-06T22:14:09+00:00

Given a certain date, I want to set the value of a cell with

  • 0

Given a certain date, I want to set the value of a cell with a DateTime object, but without the “Time” information. For example, for today the value would just be “29/06/2012” and not “29/06/2012 16:54:36”.

Concerning the display, for today’s date I want it to be written like this (it is in french, I don’t know how it would be in english): “29 juin” and not “29/06/2012”.

How can I achieve this?

EDIT : I just took a look at the display formatting I need in Excel, it is “jj mmmm” (“dd mmmm” in C#). But the cell, though taking the value, does not take the formatting. Here is a piece of code:

                 cell.Value = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
                 cell.NumberFormat = "jj mmmm";

I also tried:

                 cell.Value = DateTime.Now;
                 cell.NumberFormat = "jj mmmm";

In that case, the display formatting is OK, but the cell value contains the Time information, which is not OK.

  • 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-06T22:14:10+00:00Added an answer on June 6, 2026 at 10:14 pm

    just change DateTime.Now to DateTime.Date and the time will be zero’d out

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

Sidebar

Related Questions

I know I can use datetime.isocalendar() for getting the weeknumber given a certain date.
How can I parse a date/time string into an Access Date object given a
Given a certain set of parameters is it possible to stop a set of
I am trying to write some code to correctly set an expiration date given
I am trying to build a count-down widget. Given a certain date, whats the
I have several thousand log files with date-time stamps in them that mark certain
I need to show a date in a certain format on screen, but I
Given an app (your app) and a certain action it has, is it possible
Given a table where the first column is seconds past a certain reference point
Given this markup: // Calendar.html?date=1/2/2003 <script> $(function() { $('.inlinedatepicker').datepicker(); }); </script> ... <div class=inlinedatepicker

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.