Hi bedathur_ganesh,
Have you tried using
.Parse instead of
.ParseExact? If your date is in the format like the value of string
dateTime
, then using ParseExact will fail since the format of the
dateTime's value is
dd-MM-yyyy hh:mm:ss
and you want to parse it exactly in
dd-MMM-yyyy HH:mm:ss
.
You can read more from this
link.[
^]
@helianthus87 - MMM is allowed format for month. This is the 3-letter representation of month (e.g. Jan, Feb, Mar, etc.).
Hope this helps.