This is working: (but only date is getting passed to the API)
public async Task ConfirmFLSANotice(string mechNbr, DateTime AcceptedDate)
{
await PutAsync("confirmflsanotice", mechNbr, AcceptedDate.ToString("yyyy-MM-dd"));
}
Here I am passing just date but I want to pass time also, but no other format is working except this ("yyyy-MM-dd"). I've tried multiple ways.
This is controller code:
[JwtAuthentication]
[Route("api/login/confirmflsanotice/{mechNbr}/{AcceptedDate}/")]
[HttpPut]
public void ConfirmFLSANotice(string mechNbr, DateTime AcceptedDate)
{
var proxy = DsRegistry.Current.GetService<IUserDsService>();
proxy.ConfirmFLSANotice(mechNbr, AcceptedDate);
DsRegistry.Current.CloseService(proxy);
}
I cannot change controller code.