TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Istudent Rana
1.4k
342
84k
How do create Date from time (hh:mm) and bind with Datetime
Feb 25 2020 12:02 AM
In my ASP.Net MVC project I am using the TimePicker plugin to render time.
$.ajax({
url: "/payroll/PostPayrollEmpSheet",
type: "POST",
data: {
'ProjectId': $('.counterPayroll').data('projectid'),
'PayrollEmployeeType': 1,
'DayNumber': $('.counterPayroll').data('daynumber'),
'EmployeeName': empName,
'PreBreakClockIn': preBreakTimeClockIn,
'PreBreakClockOut': preBreakTimeClockOut,
'PostBreakClockIn': postBreakTimeClockIn,
'PostBreakClockOut': postBreakTimeClockOut
}
})
In my Action method in backend expects DateTime datatype. How do I parse hh:mm time to DateTime and send via AJAX?
I tried to do something like this also:
'PreBreakClockIn': new Date('1970-01-01T' + preBreakTimeClockIn + 'Z'),
'PreBreakClockOut': new Date('1970-01-01T' + preBreakTimeClockOut + 'Z')
Reply
Answers (
3
)
How to get the selected row in listview asp.net c#
The type or namespace ApplicationSignInManager could not be