Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Frankie Adams   on Jun 23 In Asp.net Category.

  
Question Answered By: Funsani Chalthoum    on Jun 23

So what I am trying to do is create
SqlDateTime object to search SQL server with for a date range return. I
have 4 fields being passed in:

Start Date; //MM/DD/YYYY
Start Time; //HH:MM [a.m. or p.m.]
End Date; //MM/DD/YYYY
End Time; //HH:MM [a.m. or p.m.]

I was going to use the regular  expression to slit these up and create new
SqlDateTime objects once I converted them to Integers. Then I saw you can
use the SqlDateTime.Parse(String s) to do this. I don't know however what
format the two strings need to be in. I looked on the Microsoft site and
they don't list a format. Does anyone know what format I have to
concatenate the Date and Time strings into to pass this in? Do I have to
covert the time to military time?

Share: