Skip to content

Collection of Helpful Guides & Tutorials!

Collection of Helpful Guides & Tutorials!
Menu
  • Home
  • C#
    • Tutorials
    • C# Projects
    • Q & A
  • HTML5
  • CSS3
  • PHP
    • Tutorials
    • Q & A
  • SQL
  • JavaScript
    • Tutorials
    • Q & A
  • jQuery
    • Tutorials
    • Q & A
  • Bootstrap
  • Guides
  • Tools
December 21, 2015
HomeC# QuestionsHow to Get Current Date in C#/CSharp

How to Get Current Date in C#/CSharp

By Krishnaa C# Questions  0 Comments
using System;



namespace Hello_World
{

    class Program
    {
        static void Main(string[] args)
        {
            DateTime today = DateTime.Now;

            Console.WriteLine(today.ToShortDateString());
        }
    }
}
;

 

 
         

You May Also Like:

How to Get Current Time in C#/CSharp How to Get Current Year in C#/CSharp How to Get Current Month in String Format in C#/CSharp How to Convert Datetime to DD/MM/YYYY Format in C#/CSharp How to Check if Date is Less Than Current Date in Javascript

Recent Posts

  • Understanding Event Capturing and Event Bubbling: A Simple Explanation
  • Exploring the Difference Between let and var in JavaScript
  • Understanding Closures: A Beginner’s Guide
  • Understanding Dense and Sparse Arrays in JavaScript
  • Understanding the Difference Between Arrow Functions and Regular Functions in JavaScript

Useful Sites

  • Kody Tools
Privacy Policy
Collection of Helpful Guides & Tutorials! Copyright © 2025.
Back to Top ↑