compare Duration using asp.net vb
-
Hello Everybody I have already posted a similar topic but that one was bit confusing. This is why I am writting again. 1. Customer can choose date and time from textbox or dropdown. When customer click submit button then I want to check whether their selected date and time 8 hours more than system date and time or not. For Example: System.Today.DateTime = 10/02/09 05:06:50 , I want to compare System.Today.DateTime with customer selected data and time. Please help me Thanks in Advance Sarfaraj
Sarfarj Ahmed
-
Hello Everybody I have already posted a similar topic but that one was bit confusing. This is why I am writting again. 1. Customer can choose date and time from textbox or dropdown. When customer click submit button then I want to check whether their selected date and time 8 hours more than system date and time or not. For Example: System.Today.DateTime = 10/02/09 05:06:50 , I want to compare System.Today.DateTime with customer selected data and time. Please help me Thanks in Advance Sarfaraj
Sarfarj Ahmed
Sarfaraj Ahmed wrote:
I have already posted a similar topic but that one was bit confusing. This is why I am writting again.
There is no need of repost. If that was not clear, please modify that one rather than Cross Post.
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net
-
Sarfaraj Ahmed wrote:
I have already posted a similar topic but that one was bit confusing. This is why I am writting again.
There is no need of repost. If that was not clear, please modify that one rather than Cross Post.
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net
thank you very much
Sarfarj Ahmed
-
Hello Everybody I have already posted a similar topic but that one was bit confusing. This is why I am writting again. 1. Customer can choose date and time from textbox or dropdown. When customer click submit button then I want to check whether their selected date and time 8 hours more than system date and time or not. For Example: System.Today.DateTime = 10/02/09 05:06:50 , I want to compare System.Today.DateTime with customer selected data and time. Please help me Thanks in Advance Sarfaraj
Sarfarj Ahmed
i have not read you last post. from this one if I understood you correct,
DateTime current = DateTime.Now;
//inputDate is the date specified by customerTimespan t = current.Subtract(inputDate );
The timespan object will have the difference. i.e. re.TotalHours will have the hour difference.
-
i have not read you last post. from this one if I understood you correct,
DateTime current = DateTime.Now;
//inputDate is the date specified by customerTimespan t = current.Subtract(inputDate );
The timespan object will have the difference. i.e. re.TotalHours will have the hour difference.
Thank You very much your code does make sense. Could you please tell me a bit detail 1. You are right, input is coming from customer 2. If I substract the input then do I need to specifie any format ex. 10/02/09 5:47
Sarfarj Ahmed
-
i have not read you last post. from this one if I understood you correct,
DateTime current = DateTime.Now;
//inputDate is the date specified by customerTimespan t = current.Subtract(inputDate );
The timespan object will have the difference. i.e. re.TotalHours will have the hour difference.
is their anything i can to calculate difrence only hour, eg: 1. 60 hours 2. Not 2 Days and 12 hours
Sarfarj Ahmed
-
Thank You very much your code does make sense. Could you please tell me a bit detail 1. You are right, input is coming from customer 2. If I substract the input then do I need to specifie any format ex. 10/02/09 5:47
Sarfarj Ahmed
-
is their anything i can to calculate difrence only hour, eg: 1. 60 hours 2. Not 2 Days and 12 hours
Sarfarj Ahmed