How To Match Two String in C#

Posted by Paraszalariya12 under C# on 5/2/2013 | Points: 10 | Views : 770 | Status : [Member] | Replies : 1
hello frnd

i have an one problem. i have two field in my "shift" table

1) from_time varchar(20)
2) to_time varchar(20)

in both field stored data format is like this "10:30 PM"

and i have an two textbox
1) operation_start_time
2) operation_end_time

in that both textbox store value like this "12:30 PM".

now i m writing linq query and i want to match like this

"operation_start_time>=from_time && operation_end_time<=to_time"

how can i do ??? plz help me its urgent......plz some one help.......


Posted by: Kmandapalli on: 5/2/2013 [Member] Silver | Points: 25


Similar to database, we can even write conditions in linq query also.
var query = from d in db.shift
where d.from_time<=operation_start_time &&>=operation_end_time
select new { // write the columns that you want to select or dispaly };

Shree M.

Kavya Shree Mandapalli

Paraszalariya12, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response