Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

327
Views
How do I retrieve a date of any format in a string

I am trying to retrieve a date from a string. However, it can have any given format which is possible ie.:

dddd DD MMMM YYYY HH.mm
DD/MM/YYYY HH.mm
ddd, MM DD YYYY hh.mm
DD-MM-YYYY HH.mm

etc.

I do not know the format, so I have to look for every possible format. It can also be in every language possible.

An example could be to get the date from this string:

<b>Date: </b></p>
</td>
<td style="padding: 0cm 0cm 0cm 0cm;">
<p class="MsoNormal">Sun, 15 Jul 2018 22:21:46 +0200</p>
</td>
</tr>
<tr>
<td style="padding: 0cm 0cm 0cm 0cm;" nowrap="nowrap" valign="top">
<p class="MsoNormal" style="text-align:
                              right;" align="right">
<b>From: </b></p>
</td>
<td style="padding: 0cm 0cm 0cm 0cm;">
<p class="MsoNormal"><a href=" moz-do-not-send="true">
&lt;/a></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 0cm 0cm 0cm;" nowrap="nowrap" valign="top">
<p class="MsoNormal" style="text-align:
                              right;" align="right">
<b>To: </b></p>
</td>
<td style="padding: 0cm 0cm 0cm 0cm;">
<p class="MsoNormal"><a href="" moz-do-not-send="true"></a></p>
</td>
</tr>
</tbody>
</table>
</p>
<p class="MsoNormal"><br>
<br>
<span><br>
<br>
<br>
<br>
.</span></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:
                      auto; mso-margin-bottom-alt: auto; mso-list: l0
                      level1 lfo1;">
<span></span></li><li class="MsoNormal" style="mso-margin-top-alt:
                      auto; mso-margin-bottom-alt: auto; mso-list: l0
                      level1 lfo1;">
<span></span></li><li class="M
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!