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
suman goud
NA
176
53.7k
How to bind date in correct format from database
Oct 13 2016 6:44 AM
am able to get date from database at controller , but when i passing that to view am getting date like this ""/Date(1473273000000)/""
i tried by converting , but no result
controoler.cs
public JsonResult GetPendings(int? pendingID)
{
string eid = pendingID.ToString();
TestDemoEntities db = new TestDemoEntities();
var data = (from ap in db.Accounting_PendingBills
join apa in db.Accounting_PendingBillsAdjusted on ap.BillRef equals apa.TowardsBillRef
group apa by new { ap.BillDate, ap.Amount, ap.Party, apa.TowardsBillRef } into g
select new
{
// BillDate = g.Key.BillDate,
BillDate = Convert.ToDateTime(g.Key.BillDate),
Party = g.Key.Party,
AmountAdjusted = g.Sum(aa => aa.AmountAdjusted)
}).Where(ap => ap.Party == eid).ToList();
view
<tr ng-repeat="rm in ReceiptsViewModel ">
<td>
<input type="date" ng-model="rm.BillDate" class="input-xs" name="tdate" />
@*{{rm.BillDate|date}}*@
</td>
</tr>
JS(angular)
var getPendingData = ReceiptsService.GetPendings(c);
getPendingData.then(function (d) {
$scope.ReceiptsViewModel = d.data;
}
Reply
Answers (
1
)
Unsupported class version number[52.0] maximum 51.0, Java1.7
Getting image from database