Below is my code snippet and given return, Didn't want to remove the last characters as a string
$ini= Carbon::now()->subDays(3)->toAtomString();
return:
"2022-09-09T10:50:27-03:00"
I need:
2022-09-09T10:50:27
CodePudding user response:
You can try this :
Carbon::now()->subDays(3)->format('Y-m-d\TH:i:s');