Click here to Skip to main content
12,550,766 members (40,209 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ C#
Hi all,

I have one confusion on datetime concept that 'Difference between DateTime.Now and'?

Thanks to all in advance
Posted 27-Feb-13 19:14pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Only one thing exists: System.DateTime.Now. "System" can be omitted if you used using System.

Honestly, sometimes I think that the use of "using" clause should be prohibited to some beginners, to let them understand the basics. You probably don't understand what is the type name and how namespaces work. Better read on this topic:[^].

You won't be able to do any reasonable software development if you don't understand this very basic and simple thing. I'm afraid to know what's next. How to use assemblies? :-)

Espen Harlinn 28-Feb-13 8:19am
Right :-D
Sergey Alexandrovich Kryukov 28-Feb-13 11:05am
Thank you, Espen.
H.Brydon 28-Feb-13 15:30pm
Sergey Alexandrovich Kryukov 28-Feb-13 15:45pm
Thank you.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

DateTime.Now is equal to System.DateTime.Now

When We use
then need to declare
Using System;
in your code, but no need to add "Using" statement when you write
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

DateTime.Now is not as same as System.DateTime.Now

so use differetently namespaces are as


and using System

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100