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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:59:08+00:00 2026-06-09T21:59:08+00:00

I am having a problem. How do I show the text of my Date

  • 0

I am having a problem. How do I show the text of my Date correctly?

using DateTime.Now I was able to recieve the date & time the computers clock is set to currently, however, when I try to parse into a string format, it also shows the date like: 12-04-2012 12:38 but I was trying to get the time string only, like 12:38 only?

What I tried so far was Console.WriteLine(DateTime.Now.ToString("00:00:00"));

But it did not work =/

  • 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-09T21:59:10+00:00Added an answer on June 9, 2026 at 9:59 pm

    DateTime has a ToShortTimeString method defined:

    DateTime.Now.ToShortTimeString()
    

    Or, you can use a custom format string:

    DateTime.Now.ToString("HH:mm")
    

    Alternatively, use the standard format string for short time format:

    DateTime.Now.ToString("t")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a weird problem where lots of ^M characters show up in
I am having problem using mvc:resources in spring 3.1 configuration. Initially i was working
I'm using vb.net and sql server 2000 for developing my application....The problem i'm having
I am having a problem with the textbox text updating in my view. I
I'm having a problem with getElementbyId as follows: <script type=text/javascript> <!-- function show_links(locale) {
I am currently having a problem with multiple div's toggling at the same time.
I am having a problem with our RSS feed displaying correctly in Safari but
I'm having a problem with a text view embedded in a ScrollView. That is,
I'm having a problem with the plt.text() method in matplotlib and I am hoping
I've on a while on rails now and here's the problem I've been having

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.