3
In a return of a jquery function, the date returned comes in this format.
/Date(1401731794773)/
I would like to remove the invalid characters on that date, which are:
/Date(
and )/
I only need the date component (remaining numeric) to compose a valid date. So how do I do that? I think a REGEX would be the best way, right?
this second solution works for both Javascript and C# - the only difference is that in C# S must be uppercase in Substring
– lgomide
@Igomide Truth, this detail went unnoticed. I corrected, and also changed the order to Javascript solution come first (I kept the
string
explicit however). Thank you!– mgibsonbr