Solved

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

Posted on 2014-11-29
3
358 Views
Last Modified: 2014-12-06
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.
0
Comment
Question by:Jugnoo2013
  • 2
3 Comments
 
LVL 21

Expert Comment

by:Craig Wagner
ID: 40472499
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
 

Author Comment

by:Jugnoo2013
ID: 40472817
I agree but TimeSpan is mapped to time(7) data type in sql server. It will just be used for time only calculations.
0
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 40472887
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question