I am passing date from my angular 6 application to web api. The problem is when I select for example 10th March 2019 from datepicker. When I get that in web api it's converting it into 9th March 6:30 pm, I think its some with the time zone, but I dont need time I just want to pass date.
Following is angular code
getBookingList() {
this.bookingListSubscription = this.restService.getBookingListForGrid(this.booking).subscribe(
data => {
setTimeout(() => {
if (data.status = '200') {
this.bookingList = data;
this.bookingList.forEach((element) => {
element.StartDate = this.datePipe.transform(element.StartDate, "dd/MM/yyyy"),
element.EndDate = new Date(element.EndDate);
});
}, 3000)
});
}
And I am storing date into DateTime format in c#.
yyyy-MM-dd?