Hi bubblers…
has anyone found a more efficient and easy way to convert a text field into a date…
my scenario is that we have an email inbound that receives emails from agencies and within those emails there are 2-3. dates. As these are contained within the text body of the email we are unable to use the JSON input to separate them out and format them as dates.
I’ve been experimenting with extraction and using REGEX, but I feel it’s getting way too complicated for something that should be relatively simple process to format text as date. particularly since I’m thinking I’d also have to do a search and replace for each Month and convert to an integer. Jan > 01, Feb >02, Mar>03 etc…
I did get some form of system in my head by having an arbitrary date of 01/01/0000 00:00 and then using the +years +months +days +Hours +minutes to then increment from there. it seemed to work fro the year, but then I got into the month and couldn’t think on how to do it all in one expression.
my date formats within the email are…
Between 08:00 (UTC+1) on Tue 16 Jul 2024 and 20:00 (UTC+1) on Tue 16 Jul 2024
Issued: 10:17 (UTC+1) on Mon 15 Jul 2024
The entire email is at the bottom of the post so you can see the use case.
Has anyone got any relatively simple and scalable solution to this dilemma?
thanks in advance
View all warnings | Email preferences | View in browser
# Weather warning
| ## Yellow warning for North West England | |
|---|---|
| Rain | |
| Between 08:00 (UTC+1) on Tue 16 Jul 2024 and 20:00 (UTC+1) on Tue 16 Jul 2024 |
Headline
Some places staying dry but slow-moving, heavy showers are likely to lead to some disruption, particularly to transport.
What to expect
- Spray and flooding on roads probably making journey times longer
- Bus and train services probably affected with journey times taking longer
- There is a small chance that a few properties could be temporarily flooded in the heaviest showers.
Issued: 10:17 (UTC+1) on Mon 15 Jul 2024
Further details
Heavy showers are expected to develop during Tuesday morning, then become more widespread and slow-moving across the east of the warning area during the afternoon. Whilst many places will miss the worst, where showers do occur, 15-20 mm rainfall is likely within an hour, and perhaps 30 to 40 mm in 1 to 2 hours in a few places. The odd lightning strike is also possible.
Showers will steadily ease during the evening.
What should I do? Consider if your location is at risk of flash flooding. If so, consider preparing a flood plan and an emergency flood kit.
Give yourself the best chance of avoiding delays by checking road conditions if driving, or bus and train timetables, amending your travel plans if necessary.
People cope better with power cuts when they have prepared for them in advance. It’s easy to do; consider gathering torches and batteries, a mobile phone power pack and other essential items.
If you find yourself outside and hear thunder, protect yourself by finding a safe enclosed shelter (such as a car). Do not shelter under or near trees, or other structures which may be struck by lightning. If you are on an elevated area move to lower ground.
Be prepared for weather warnings to change quickly: when a weather warning is issued, the Met Office recommends staying up to date with the weather forecast in your area.
View full warning details and map view
Regions and local authorities affected
Central, Tayside & Fife
- Angus
- Clackmannanshire
- Dundee
- Falkirk
- Fife
- Perth and Kinross
- Stirling
Grampian
- Aberdeen
- Aberdeenshire
North East England
- Durham
- Gateshead
- Newcastle upon Tyne
- North Tyneside
- Northumberland
- South Tyneside
- Sunderland
North West England
- Cumbria
SW Scotland, Lothian Borders
- Dumfries and Galloway
- East Lothian
- Edinburgh
- Midlothian Council
- Scottish Borders
- West Lothian
Strathclyde
- East Ayrshire
- East Dunbartonshire
- East Renfrewshire
- Glasgow
- North Lanarkshire
- South Lanarkshire
Manage your email preferences:
Download our app for warning updates on the go

For enquiries regarding this warning, please contact the Met Office Weather Desk:
+44 370 900 0100
enquiries@metoffice.gov.uk
View all warnings Email preferences View in browser Unsubscribe
Follow us on
![]()









