0

So i am busy with coding a program though the date format is Y-m-d but i need it to be the european date format. thus having to be d-m-Y but i do not know how to do this since the files come directly from my database. echo $row['Datum'];if possible i'd love some help with this issue

0

1 Answer 1

2

Try date() like:

echo date('d-m-Y', strtotime($row['Datum'])); 

Ex:

$row['Datum'] = '2017-06-30'; echo date('d-m-Y', strtotime($row['Datum'])); // Output: 30-06-2017 

Php Fiddle Link

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks it helped alot ^^ it actually did exactly as it was supposed to so thanks for that mate ^^

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.