Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MahmoudAdelAli's avatar

How To Split And Join Date

Hi , i make a reservation system and there's table for contracts , when i add record with room

Ex:
start_date = 20/2/2023
end_date = 30/2/2023

and another record

Ex:
start_date = 23/2/2023
end_date = 27/2/2023

i need to add option to split it the dates to 2 records like First Record

start_date = 20/2/2023
end_date = 23/2/2023

And The Second Record

start_date = 27/2/2023
end_date = 30/2/2023

In short, more , We create two contracts

Jan 23 - 30 (first)
Jan 26 - Jan 28( second) 

We split Will now be

Jan 23 -25
Jan 26 - 30

and the grouping is the grouping is to group different room types inside date band

0 likes
2 replies

Please or to participate in this conversation.