Home › Forums › General Issues › Working with a numbers field to show difference between two dates › Reply To: Working with a numbers field to show difference between two dates
Strange, if i format the first variable like my second example:
$date_1 = new DateTime( '1999' );
It will show “20 years of experience” on the frontend, if i change the variable to ( ‘1975’ ) it will show “44 years of experience” on the frontend so that part seems to work?
My question was initially, how to insert my ACF value from the numbers field in the variable, but you are saying that even if i did, it won’t work?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.