S
Seb
Hello,
I have an old database which had multiple dates stored in it.
Unfortunately, there were no fixed format for these dates and I now
have to standardize everything. In the past, I used to create a Date
object using the Date(String) constructor in order to parse the string
containing the date, since this constructor could recognize a date in
(almost) any format. Unfortunately, this constructor is now
deprecated and I want to use a non-deprecated method.
I tried to use the suggested replacement to this constructor, which is
the DateFormat.parse(String) method, but this method requires that we
specify the date format before parsing the date. As I mentioned
previously, I don't know the format of the field and don't really know
what to use anymore.
Any help would be more than welcome.
thanks in advance.
I have an old database which had multiple dates stored in it.
Unfortunately, there were no fixed format for these dates and I now
have to standardize everything. In the past, I used to create a Date
object using the Date(String) constructor in order to parse the string
containing the date, since this constructor could recognize a date in
(almost) any format. Unfortunately, this constructor is now
deprecated and I want to use a non-deprecated method.
I tried to use the suggested replacement to this constructor, which is
the DateFormat.parse(String) method, but this method requires that we
specify the date format before parsing the date. As I mentioned
previously, I don't know the format of the field and don't really know
what to use anymore.
Any help would be more than welcome.
thanks in advance.