ASP Common functions

Source: Internet
Author: User
Tags integer square root

1 mathematical function


1.1 integer function


int (x) takes the largest integer not greater than X.


fix (x) goes to the decimal part of X.


1.2 Absolute Value function


ABS (x) to find the absolute value of x.


1.3 Symbolic function


SGN (x) is the symbol code for x, and the function value is-1 when X is negative.


1.4 square root function


SQR (x) to find the arithmetic square root of x, x must be greater than 0.


1.5 exponential function


exp (x) asks for a value with an index of e as the base x.


1.6 Logarithmic function


log (x) to find the value of the logarithm function with E as the base.


1.7 Trigonometric


sin (x) to find the sine value of x.


con (x) to find the cosine of x.


Tan (x) to find the tangent value of x.


Atn (x) to calculate the tangent value of x.


1.8 Conversion Function


Hex (x) decimal is converted to the corresponding hexadecimal number.


Oct (x) decimal is converted to the corresponding number of octal.


2nd period Time function


2.1 System Date Time function


now () reads the system current date time.


date () reads the system's current day.


time () to read the system current times.


2.2 Date Time decomposition function


year (date string) returns the years in the date string.


month (date string) returns the month in the date string.


Day (date string) returns the days in the date string.


Weekday (date string) returns the week in the date string.


hour (time string) returns the hours in the time string.


minute (time string) returns the Minutes in the time string.


Secont (Time string) returns the number of seconds in the time string.


2.3 Date-time numerical function


dateValue (date string) converts a date string to the number of days from 1889-12-30 to the day.


TimeValue (Time string) converts a time string to a variant time value between 0~1.


2.4 Date-time operational function


dateSerial (year, month, day) to connect the day to date string.


timeserial (time, minutes, seconds) is connected to a time string.


timer () calculates the number of seconds from midnight to the current system time.


3 string processing function


3.1 Remove the space function


Trim (String) deletes a string of space characters on both ends.


LTrim (String) deletes the left-end space character of the string.


RTrim (String) deletes the string at the right end of the space character.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.