Solved

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

Posted on 2014-11-29
3
333 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array11 challenge 16 52
How can i Install a new Data Source on Visual Studio 2 77
Post a good COM tutorial 1 37
Java Loop 6 25
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now