Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
Dear Code Project Viewer

Which date is Greater than other one?

I have Doubt for date and time

Example:
C#
Date1 ="1/3/2012 8:30:00 AM" and Date2 = "1/3/2012 5:44:00 PM"


Give me answer

By mohan.
Posted
Updated 3-Jan-12 5:15am
v2
Comments
[no name] 3-Jan-12 7:26am    
Seriously?! You can't tell time?
Smithers-Jones 3-Jan-12 7:32am    
Is this a joke or a trick question? D'oh.
Anuja Pawar Indore 3-Jan-12 9:13am    
This is not a question. You want to tell us difference between AM and PM

Date1 ="1/3/2012 8:30:00 AM" and Date2 = "1/3/2012 5:44:00 PM"


Date2 is greater than date1
 
Share this answer
 
Hi,
It is quite obvious mohan Date2 is greater..

SQL
insert into Table (Date)
values ('2005-03-01 08:30:00 AM')

insert into Trans (Date)
values ('2012-03-01 05:44:00 PM')


SELECT MAX(Date) FROM Table
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900