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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:06:50+00:00 2026-05-26T08:06:50+00:00

How to convert C# Datetime.Today , into Timestamp format 10/20/2011 12:00:00 in mysql?

  • 0

How to convert C# Datetime.Today, into Timestamp format 10/20/2011 12:00:00 in mysql?

  • 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-05-26T08:06:51+00:00Added an answer on May 26, 2026 at 8:06 am

    If you want to get the date time as a string in that format then you can do…

    string dt = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss");
    

    See here for extra formatting options for the DateTime ToString method

    Though from my understanding of MySQL it will accept a timestamp in the format yyyy-MM-dd HH:mm:ss. I would recommend doing this as it will ensure dates like 05/08/2011 are parsed correctly for the right month and day…

    string dt = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I convert a datetime or date object into a POSIX timestamp in
convert datetime format yyyy-mm-dd hh:mm:ss (Might be a string) into UTC, Looking into DateTime
In my SQL query: insert into Tbl_EmpMovement_T values ( '004101', '2011-8-26', CONVERT(datetime,convert(varchar(10),'2011-8-26',120)+' ' +
I use this to convert DateTime value into Date and then I add 00:00:00
What Convert.DateTime will convert the date 7/25/2010 12:00:00 it's current format is(MM/dd/yyyy HH:mm:ss)? When
I have a DateTime object 2/19/2011 12:00:00 AM . I want to convert this
Trying to convert a date & time value in the format of 07/19/2011 00:00
How can I convert DateTime Thu Nov 30 19:00:00 EST 2006 to 11/30/2006
How do I convert a DateTime structure to its equivalent RFC 3339 formatted string
How do I convert a datetime string in local time to a string in

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.