I am trying to modify a program on Windows CE 5.0 device that scans barcode for dates.. What is the best way to strip invalid string from the date format
example:
2014/03/12 --> 20140312
2014.03.12 --> 20140312
2014-03-12 --> 20140312
What I want is to automatically remove those strings(/,-,.)
Thanks!
Use:
Regex.Replace("2014/03/12", "[^0-9]", string.Empty)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With