This topic is locked

Auto Fill Week End Date, Adding days to existing date

4/14/2018 6:58:52 PM
PHPRunner General questions
D
dustinforehand author

I am trying to get my "add page" to calculate 7 days after the start date. The start date would be the first day to the week and the end date would be the last day of the week (Sunday - Saturday).
I have a table that has the following Fields
TableName: Planner
Fields

PlannerID (AI, Primary)

SaleNumber (VARCHAR)

DateStr (DATE)

DateEnd (DATE)

Active (INT)
I was trying to use the following below snippet in the php snippet tool in Visual Editor for the "Default value" and "AutoUpdate value" for Field "DateEnd" to calculate the End of Week Date
$values['DateEnd'] = $values['DateStr'] + '7';