Copy and try this code in phpfiddle and press run.
<?php $date_val ="2018-08-23 10:30:45"; ?>
<input name="datedepart" type="date" value="<?php echo date('Y-m-d',strtotime($date_val)) ?>" />
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Policy key definitions:
Under the GDPR your rights are as follows.
We ensure the security of any personal information we hold by using secure data storage technologies and precise procedures in how we store, access and manage that information. Our methods meet the GDPR compliance requirement.
Clickable sponsored or affiliate links may be displayed as a website URL like this; www.example.com/blog/welcome.php or as a titled text link like this: How To Start A Blog. Clicking on any adverts, sponsored or affiliate links may track your actions by using a cookie saved to your device. You can read more about cookies on this website above. Your actions are usually recorded as a referral from our website by this cookie. In most cases we earn a very small commission from the advertiser or advertising partner, at no cost to you, whether you make a purchase on their website or not.
We use advertising partners in these ways to help generate an income from the website, which allows us to continue our work and provide you with the best overall experience and valued information. If you have any concerns about this we suggest you do not click on any adverts, sponsored or affiliate links found throughout the website.
Under the GDPR we use the consent lawful basis for anyone subscribing to our newsletter or blog post list. We only collect certain data about you, as detailed in the "Processing of your personal date" above. Email newsletter messages that we send may contain tracking & server technologies in order to track subscription (subscribe / unsubscribe) activity within email messages. Where used, such marketing messages may record a range of data such as; dates, email I.P addresses, opens, clicks, forwards, geographic and demographic data. Such data, within its limitations will show the activity each subscriber made for that email campaign.
Any newsletter email messages we send are in accordance with the GDPR and the PECR. We provide you with an easy method to withdraw your consent (unsubscribe) or manage your preferences / the information we hold about you at any time. See any newsletter / new blog post subscription messages for instructions on how to unsubscribe or manage your preferences.