How to implement timespan data entry in ASP.net MVC application using am/pm for time entry?

How to implement time span data entry in ASP.net MVC application using  am/pm for time entry?
Back end sql table is using time as data type.
Jugnoo2013Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Craig WagnerConnect With a Mentor Software ArchitectCommented:
One problem you're going to run into is that the TimeSpan type represents an interval of time, it has no concept of am/pm. If you're trying to represent a time-of-day you've picked the incorrect type. You'll probably need to use a datetime and then apply an editor mask so only the time portion shows up and is entered.
0
 
Craig WagnerSoftware ArchitectCommented:
TimeSpan has a very specific meaning in .NET, there is a datatype for it. Are you sure that's what you're asking for? Or do you mean "date/time data entry?"
0
 
Jugnoo2013Author Commented:
I agree but TimeSpan is mapped to time(7) data type in sql server. It will just be used for time only calculations.
0
All Courses

From novice to tech pro — start learning today.