Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php print datetime

Get a Time
  
  echo "The time is " . date("h:i:sa");

Here are some characters that are commonly used for date:

d - Represents the day of the month (01 to 31)
m - Represents a month (01 to 12)
Y - Represents a year (in four digits)
l (lowercase 'L') - Represents the day of the week

Here are some characters that are commonly used for times:

H - 24-hour format of an hour (00 to 23)
h - 12-hour format of an hour with leading zeros (01 to 12)
i - Minutes with leading zeros (00 to 59)
s - Seconds with leading zeros (00 to 59)
a - Lowercase Ante meridiem and Post meridiem (am or pm)
  
  
  
Comment

PREVIOUS NEXT
Code Example
Php :: sub menu for post type in wordpress 
Php :: how to get data from json array in php 
Php :: if else if php code reflect 
Php :: removing index.php in codeigniter 
Php :: laravel url download file 
Php :: wc php if is product category page 
Php :: get value from url in laravel blade 
Php :: php check if checkbox isset 
Php :: date hour php 
Php :: @foreac laravel 
Php :: pdf to image php 
Php :: php reverse dns lookup 
Php :: laravel latest from relationship 
Php :: autoload file laravel 
Php :: custom autoload without composer 
Php :: php new PDO timeout 
Php :: variavel de variavel php 
Php :: json stringify to php array 
Php :: add-basic-controller-imports 
Php :: get all class methods php 
Php :: php domdocument list all elements 
Php :: ternaire echo isset php 
Php :: php define class 
Php :: laravel request unique 
Php :: laravel number input positive only 
Php :: get query string in symfony twig 
Php :: php define array first 10 number 
Php :: text box should accept only alphanumeric not special characters in php 
Php :: codeigniter 4 delete redirect with data 
Php :: php get index of string 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =