Register
Sign In
Skip over navigation
Home
Add New Question
Jobs
Products
Compare two dates
Question posted
in
Computer Software
on
04 2010
Rate question difficulty level
2
1 Votes
Compare two dates using no more than two if statements?
Add an answer
Share
|
1 Answer
Guest
My answer would be
DateTime dt1 = new DateTime(2006, 01, 24);
DateTime dt2 = new DateTime(2006, 01, 23);
///////////first statement
if (DateTime.Compare(dt1, dt2) < 0)
Console.WriteLine("second date is larger than the first date");
///////////second statement
else if (DateTime.Compare(dt1, dt2) == 0)
Console.WriteLine("second date is same as first date");
///////////This is only the outcome - not a statement
else
Console.WriteLine("second date is smaller than the first date");
04/06/2010
Add an answer*
Your name
Email
Enter the code shown above:
please wait..
Company:
Kronos
Location:
India
Tags:
developer
,
programing
Occupations:
Software\Web Development
,
Web\UI\UX Design
add a question
Now hiring!
Information Technology Development Program/Software Engineer
National Security Agency (NSA)
Fort George G Meade, MD
To advance the development of Information Technology, NSA has created the new Information Technology Development Program ... 'Software development life cycle experience (e.g., software design, quality assurance, testing, planning,...
---------------------------
IT & Engineering Professionals w/ Poly
SRA International
Herndon, VA
Business focuses on providing high-end information technology solutions and support to clients within the ... Architects ? Configuration Management Specialists ? Software Engineers ? Software Developers ? Geospatial...
---------------------------
IT Application Analyst
Saint Barnabas Health Care System
Oceanport, NJ
projects. Participate in and provide leadership for development and support of automation initiatives. Research ... skills. Experience in w orking with and developing hospital information systems. Patient Accounting and/or registration...
---------------------------
IT Mgr Software Engineering
Apollo Group
Phoenix, AZ
supervision and the software development guidelines and technology standards defined by Apollo Corporate IT, this ... Experience supervising and/or leading other professional level IT staff is required...
---------------------------
Senior Software Developer - Info Technology Job
Mercer
Deerfield, IL
Senior Software Developer - Info Technology-DEE000C5 Description Mercer is the global leader for trusted Human Resources ... information, please visit us at: www.mmc.com/diversity. Job Information Technology/Software Development Primary Location...
---------------------------
Account Manager - IT Staff Augmentation/IT Consulting Services
TNT Staffing
Emerson, NJ
for highly motivated, dynamic Information Technology (IT) Sales Professionals to join our growing IT Staffing ... and a passion for relationship building and business development. The right candidate will have a successful...
---------------------------
Software Development Manager 2 - Health IT
Northrop Grumman
Providence, RI
Northrop Grumman is seeking an experienced Software Development Manager to join our team of qualified, diverse ... years of relevant experience - Experience with IT Project Development Lifecycle - Strong Medicaid/Medicare business...
---------------------------
Software Development Analyst 2 - Health IT
Northrop Grumman
Providence, RI
Northrop Grumman Information Systems Sector is seeking a Software Development Analyst 2 to join our team of qualified, ... development life cycle (SDLC) in support of application software from design, development, testing, documentation...
Jobs
by
Simply
Hired
View all jobs