0

I have an c# API that need to accept DateTime variable from several angular 2 apps. Problem is, every app sends parameter in different format.

How can i get current format string for DateTime variable in Angular 2, so i could pass that to my API and unify it on server?

onedevteam.com
  • 3,838
  • 10
  • 41
  • 74

1 Answers1

0

You could treat date passed to your API as string at first and work from there (try parsing with different formats, e.g. using custom model binder). But the whole process should obvoiusly work the other way around - API should enforce certain date format on Angular apps.

borkovski
  • 938
  • 8
  • 12