Detailed explanation of the use of date-related functions in JS
Mar 26, 2018 am 09:28 AMThis time I will bring you JS date-related functions Detailed explanation of usage, precautions when using JS date-related functions, the following is a practical case, let’s take a look.
1. Date related Function
select current_date(); select current_date; select current_time; select current_timestamp; select date_add (current_timestamp(), interval 1 year); select date_add (current_timestamp(), interval 1 month); select date_sub (current_timestamp(), interval 1 year); select date_sub (current_timestamp(), interval 1 month); select datediff(current_timestamp(), date_add (current_timestamp(), interval 1 month ); select timediff('12:30:30', '18:30:30'); select now();select year(now()); select month(now());
2.Process controlFunction
IF (expr1,expr2,expr3); select if (1 > 0, 'hello','see you'); IFNULL (expr1,expr2);select ifnull (null, 3 + 2); SELECT CASE WHEN expr1 then expr2 else expr3 end; select case when 10> 0;
3.Other functions
USER(); DATABASE(); MD5(str) ; PASSWORD(str );
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
Laravel implements multi-user authentication system
PHP data security method to prevent SQL injection
The above is the detailed content of Detailed explanation of the use of date-related functions in JS. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What software is crystaldiskmark? -How to use crystaldiskmark?

Detailed explanation of obtaining administrator rights in Win11

How to download foobar2000? -How to use foobar2000

Detailed explanation of division operation in Oracle SQL

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange?

Teach you how to use the new advanced features of iOS 17.4 'Stolen Device Protection'
