Date format after regex parse

Post Reply
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Date format after regex parse

Post by michel.weber »

I'm trying to extract a date from html.

The html is something like the following :
<!-- Date Updated -->
<td>
2008-Jul-16 18:27 </td>

I managed to get the regex working and it extracts the date into an additional field i have declared as a string.

As soon as i declare the addiional field as type date i get a wrong date : 2021-12-29

Obviously the expected date format is not yyyy-mmm-dd.
Is there an easy way to get this parsed correctly into a date variable?
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Date format after regex parse

Post by michel.weber »

I found the answer :
Instead of returning 'yyyy-mmm-dd' which seems to be an invalid date format, i now return 'dd mmm yyyy' which is valid.
Post Reply