Jump to content

Help with php time


gibigbig

Recommended Posts

My project requires me to make sql queries based on the month you are currently in as well as the subsequent months months before this.

 

Example:

 

to get the month number in php you use

 

$month_num = date("n");

 

and for the month before you use:

 

$month_before - date("n") - 1;

 

what i need is a way of converting the $month_before to epoch timestamps.

so i can do make a sql query for all user's activity in that month. Please help

Link to comment
https://forums.phpfreaks.com/topic/242217-help-with-php-time/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.