0

I should import this data 2019-05-28T00: 00: 00.0000000 + 02: 00 but not in full, only the first part should be published, month-day-year, that is 2019-05-28. In short, I should cut off everything that comes after. I can't figure out how to do it if I have to use str_replace, but I don't know how to set it up. Can you tell me the procedure? Thank you enter image description here

1 Answers1

0

Have you tried to use regex?

For example this really primitive one: ^(\d\d\d\d-\d\d-\d\d)

https://regexr.com/65seu

This question gives clues on how to do it in PHP:

PHP Using RegEx to get substring of a string

montrealist
  • 5,593
  • 12
  • 46
  • 68