2

I run a business and have been developing a CMS / invoicing on my website.

"Appointment" 12:30 PM Thu Aug 5 2021

Though I can format this any way I like, is it possible at all to get the unix time stamp of that?

The purpose of doing so would be so I can just insert the unix timestamp and be able to sort my appointments by the closest to date.

Thank you.

Josh
  • 21
  • 3
  • If I understood you correctly, you want to convert a date format to unix. Is that right? If so: `$timestamp = strtotime('1/1/2021 21:00');` (where 1/1/2021 you will use your date and time) – Guilherme Aug 01 '21 at 00:26
  • oh wow yes that's exactly what I need! thank you – Josh Aug 01 '21 at 03:36
  • Just added my comment as answer so others can find it easier! – Guilherme Aug 01 '21 at 18:13

1 Answers1

0
$timestamp = strtotime('1/1/2021 21:00');

Replace 1/1/2021 21:00 to the desired date.

Guilherme
  • 80
  • 2
  • 10