hi everyone this is Raghu from tutorial travicom and welcome to PHP video series in this lecture I’ll try to you know give your different options are available in PHP with time and date so if you see I gave some examples like how can we use date so if you use date and followed by Y within double quotes it will return the current here example if I execute now I can see 2017 so we can see last two characters 17 and similarly we can get the month and day and also we can get the current month name like August January February so we can get those month details if you use the letter F within the date and similarly we have h for our and then I for minutes we have s for seconds so we will see few examples then this will be 3 L so let’s open you will text editor so inside the concepts let me create a new file and let’s save it as time or date open space Peter okay now let’s just use some echo statement so we will see this is so okay one more thing I want to show this example so this is this here is so we can have something like this and then followed by date of Y so let’s check that in our browser so let’s open concepts great so this here is 70 okay and also you can use the concatenation operator so remember if you want to use Khun Kat link concatenation so sure so you can use the help of dot so for example if I want to display the same result I can display in a different manner that is so I don’t want to use another echo statement i juice dot so this will print this here is equals and then followed by date okay let’s open the browser again so we got the same output so I want to do something else so here I want to use some space far away to 0 just okay concatenation dot operator so this here is 2070 so something like that so similarly let’s try some old and let me use the break you know so that I will get all the echo statements in different different lines okay sorry I just don’t need okay now let’s check the output and then we will copy this is the perfect order and then use the break statement stirred several times so this is here and Monte’s you can use em for month and you can use D for date a day and month name so we can get month name by using f and also we have our and we also have the minute and seconds second okay so let’s same and I’ve run this so this is 2017 and month is nine days also nine month name is September and it is 23 this minute is 57 and this is this seconds so if you see that time it is giving me as 20 rate means it is following that 20 you know 24 hour format

Tags:






Youtube
Facebook
Google Plus
Twitter
TutorialDrive


Apache Zookeeper Tutorial

Apache Kafka Tutorial

Apache Kafka Security

Elasticserarch n Kibana

Java 8 Tutorial

Log4J Tutorial

Apache Storm Tutorial

SQLite Tutorial

Apache Ant Tutorial

Related Posts

blog

Apache Kafka Commands Cheat sheet

Spread the loveKafka Topics List existing topics bin/kafka-topics.sh –zookeeper localhost:2181 –list Purge a topic bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –config retention.ms=1000 … wait a minute … bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –delete-config retention.ms
Read more…

blog

What is Apache Maven | Apache Maven complete tutorial from scratch pdf

Spread the love In this post you will learn the complete tutorial of Apache Maven build tool What is Maven ? Apache Maven is a software project management and comprehension tool. Based on the concept
Read more…

blog

Practical Guide for Web Development in 2018

Spread the loveWelcome to my practical guide  for web development in 2018 in terms of  technology and career. Before we start I just want to  mention a few things, you don’t need to learn  everything that
Read more…