Skip to content

GeekyBoy.com

Adam Culp's Tech Blog

Tag: convert dates

Get past date or convert different date format with php

Quick way to figure out a past date in PHP. echo date("Y-m-d", strtotime("20 days ago"));echo date("Y-m-d", strtotime("20 days ago")); echo date(’Y-m-d’,strtotime(’12/15/2008’));echo date(‘Y-m-d’,strtotime(’12/15/2008′));

Published January 25, 2007
Categorized as php, programming, Quick Tips Tagged convert dates, date, php, programming, strtotime

Pages

  • About Adam
  • Talks
  • Videos
  • Contact

Recent Posts

  • Sharing the Beachcasts office and studio set up
  • 10 reasons to become a consultant or have a consulting business
  • Zend Framework becomes Laminas project
  • 10 bad things about consulting, and why it might not be for you
  • How to get lines of code in PHP with PHPLoc via CLI or using Docker
GeekyBoy.com
Proudly powered by WordPress.