Time

PHP Date and Time

In this tutorial, we are going to learn about PHP Date and Time. Date and time are part of our everyday lives. PHP also provides this tools to make it work the dates and time easier. These functions allow you to get the date and time from your server where the PHP scripts are running. Then, you can use these functions to format the date and time in some ways. Note: These function it depends on your settings of your server. Installation: No need installation for these functions.

The PHP Date() Function

The PHP date() function formats a timestamp, so they are more likely human readable.

Syntax

date(format,timestamp) format - This is required field and the timestamp must be in specific format. timestamp - This is optional field and it also specific timestamp and the current date and time is default.

Simple Date

Here are commonly used of characters for dates: d - stand for the days of the month (01 - 31) m - stand for a month (01 - 12) Y - stand for a year; like (2010) (four digits) l (this is lowercase of L) - stand for the days of the week And, there are other characters can also be used for adding additional format in dates like "/", ".", or "-".

Example

This is the image result of the code below: date
  1. <?php
  2. echo "Today is " . date("l") . "<br>";
  3. echo "The date today is " . date("Y/m/d") . "<br>";
  4. echo "The date today is " . date("Y-m-d") . "<br>";
  5. echo "The date today is " . date("Y.m.d");
  6. ?>
Another example, these function used to automatic update the copyright year of your website. This is the image result of the code below: copyright

Digital Clock

Simple Digital Clock in java swing. This app might can help you to create time and date using timer. You can also move this application by clicking the frame. To exit, double click on the frame. If you find this code useful, send me a feedback.

Date and Time

Introduction: This page will teach you about using the Date import in Java to output or get the current Time and/or Date. When is this needed? Adding a simple clock or date counter to an application adds a slightly more professional look to the overall appeal of the program, as well as having the time handy is always a good thing. What imports are needed? The imports we need to get the current Date and Time are;
  1. import

If, Else and Else If Statements

Introduction: Hello. In this tutorial you will learn about the if, else and else if statements. When are these statements used? The if statement is used to check if certain conditions are true. For example, just like we would say in English, if the time of day is noon we should eat lunch, else we shouldn't. So, what is else if? Since the if statement is used to check if certain conditions are true and else is for the opposite, what else do we need? To be able to check multiple times if certain conditions are true, but not the same.

Animation Delay Property in CSS3

Let's discuss, what is a animation-delay in CSS3. The animation-delay property specifies when the animation should start. The animation-delay value can be defined in seconds (s) or milliseconds (ms). Syntax of this property: animation-delay: time | initial | inherit ; Property Values: time - it specifies the time (can be a negative number) before the animation begins. This is a time difference

ProgressBar Clock in VB.NET

Today, I will teach you how to create a program that displays a clock using the ProgressBar in VB.NET. Now, let's start this tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application. 2. Next, add a Timer named Timer1.

Displaying Digital and Analog Clock in VB.NET

Today, I will teach you how to create and display the digital and analog time. Now, let's start this tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application. 2. Next, add two radioButtons named rbDigital and rbanalog. Insert also a timer named Timer1, add a label named Label2, and a webbrowser named WebBrowser1.