Here is the code for this success:
@(string.IsNullOrEmpty(ViewBag.Opendt) || ViewBag.Opendt == "00000000" ? "NA" : DateTime.ParseExact(ViewBag.Opendt, "yyyyMMdd", null).ToString("dd-MM-yyyy"))
Here I got the API data into a Viewbag and then used it to print my date.