Web Reporting tools Summary of usage of common functions finereport (date and time functions)

Source: Internet
Author: User
Tags time in milliseconds

Web Reporting tools Summary of usage of common functions finereport (date and time functions)


Note: Where a date is used as a parameter factor in a function, the form of the date must be YY/MM/DD. and must be quoted in the English environment under double quotation marks ("").


DATE

Date (Year,month,day): Returns a series number that represents a specific date.

Year: Represents an annual number, which can be one to four digits.

Month: Represents the months.

If 1<=month<= 12, the function takes the parameter value as the month.

If month>12, the function is incremented from the beginning of the year January. For example: DATE (2000,25,2) equals the number of series on January 2, 2002.

Day: Representative days.

If the date is less than or equal to the number of days of a specified month, the function takes this parameter value as a day.

If the date is greater than the number of days of a specified month, the function is incremented from the first day of the specified month. If the date is greater than the total number of days of two or more months, the function adds the remainder of the minus two months or months to the third or fourth month, and so on. For example: DATE (2000,3,35) equals the number of series on April 4, 2000.

Note:

This formula is available if you need to work with part of a date in a formula, such as year or month.

If the year, month, and day are constants in the function rather than in the function, this formula will best reflect its effect.

Example:

DATE (1978,9, 19) equals September 19, 1978.

DATE (1211,12, 1) equals December 1, 1211.


Datedelta

Datedelta (Date,deltadays): Returns the date deltadays after a date--date.

Deltadays can be positive, negative, 0.

Example:

Datedelta ("2008-08-08",-10) equals 2008-07-29.

Datedelta ("2008-08-08", 10) equals 2008-08-18.


Datedif

Datedif (Start_date,end_date,unit): Returns the number of days, months, or years between two specified dates.

Start_date: Represents the initial date for the specified time period.

End_date: Represents the end date of the specified time period.

Unit: The type of information returned by the function.

If unit= "Y", the Datedif returns the year difference for the specified time period.

If unit= "M", the Datedif returns the month margin for the specified time period.

If unit= "D", then Datedif returns the day difference for the specified time period.

If unit= "MD", Datedif ignores the year and month, returning the day difference for the specified time period.

If unit= "YM", then Datedif ignores the year and day, returning the month margin for the specified time period.

If unit= "YD", the Datedif ignores the year and returns the day difference for the specified time period.

Example:

Datedif ("2001/2/28", "2004/3/20", "Y") equals 3, that is, between February 28, 2001 and March 20, 2004 there are 3 full year.

Datedif ("2001/2/28", "2004/3/20", "M") equals 36, i.e. there are 36 entire month between February 28, 2001 and March 20, 2004.

Datedif ("2001/2/28", "2004/3/20", "D") equals 1116, that is, between February 28, 2001 and March 20, 2004 there are 1116 days.

Datedif ("2001/2/28", "2004/3/20", "MD") equals 8, that is, ignoring months and years, the difference between February 28, 2001 and March 20, 2004 is 8 days.

Datedif ("2001/1/28", "2004/3/20", "YM") equals 2, that is, the difference between January 28, 2001 and March 20, 2004 is 2 months after ignoring the day and year.

Datedif ("2001/2/28", "2004/3/20", "YD") equals 21, that is, after years of neglect, the difference between February 28, 2001 and March 20, 2004 is 21 days.


Dateinmonth

Dateinmonth (date,number): The function returns the day of the day in a one-month period.

Example:

Dateinmonth ("2008-08-08", 20) equals 2008-08-20.


Dateinquarter

Dateinquarter (Date,number): function returns the day of the first day of a particular quarter.

Example:

Dateinquarter ("2009-05-05", 20) equals 2009-04-20.


Dateinweek

Dateinweek (date,number): The function returns the day of the day of the first one weeks.

Example:

Dateinweek ("2008-08-28", 2) equals 2008-08-26.


Dateinyear

Dateinyear (Date,number): function returns the day of the day of the year.

Example:

Dateinyear ("2008/12/03", 300) equals 2008-10-26.


Datesubdate

Datesubdate (Date1,date2, OP): Returns the time difference between two dates.

The OP represents the unit of time returned:

"S", in seconds.

"M", measured in minutes.

"H", in hours.

"D", in days.

"W", in weeks.

Example:

Datesubdate ("2008-08-08", "2008-06-06", "H") equals 1512.


Datetonumber

Datetonumber (date): Returns the number of milliseconds elapsed since January 1, 1970 00:00:00 GMT.

Example:

Datetonumber ("2008-08-08") equals 1218124800000.


Day

Day: (Serial_number) returns the days in the date. Day is a number between 1 and 31.

Serial_number: Date containing the year of the request.

Note:

Finereport saves the date as a series number, and a series number represents a date that matches it to make it easier for the user to calculate the date numerically.

In the 1900 date system, the Finereport spreadsheet will be saved as series number 2 in January 1, 1900, saving January 2, 1900 as series number 3,

Save January 3, 1900 as series number 4 ... And so on As in the 1900 date system, January 1, 1998 is saved as series number 35796.

Example:

Day ("2000/1/1") equals 1.

Day ("2006/05/05") equals 5.

Day ("1997/04/20") equals 20.

Day (35796) equals 1.


DAYS360

DAYS360 (Start_date,end_date,method): According to the algorithm 360 days a year (30 days per month, a total of 12 months a year),

Returns the number of days between two days, which will be used in accounting calculations. If the financial system is based on 12 months a year, 30 days a month,

You can use this function to help calculate payments.

Start_date and end_date: is the start and end date for calculating the number of days in a period.

Method: It specifies whether the European or American approach is used in the calculation.

Method definition:

False or ignore the US method (NASD). If the starting date is one months of 31st, it is equal to the number 30th of the same month. If the termination date is one months

Number 31st, and the starting date is earlier than 30th, the end date is equal to 1th for the next one months, otherwise the end date is equal to the 30th number of this month.

True European method. Either the start date or the ending date of one months is 31st, which will be equal to the number 30th this month.

Note:

Finereport saves the date as a series number, and a series number represents a date that matches it to make it easier for the user to calculate the date numerically.

In the 1900 date system, the Finereport spreadsheet will be saved as series number 2 in January 1, 1900, saving January 2, 1900 as series number 3,

Save January 3, 1900 as series number 4 ... And so on As in the 1900 date system, January 1, 1998 is saved as series number 35796.

Example:

DAYS360 ("1998/1/30", "1998/2/1") equals 1.


Daysofmonth

Daysofmonth (date): Returns the number of days that are included in a month since January 1900. Example:

Daysofmonth ("1900-02-01") equals 28.

Daysofmonth ("2008/04/04") equals 30.


Daysofquarter

Daysofquarter (date): Returns the number of days in a quarter from January 1900.

Example:

Daysofquarter ("2009-02-01") equals 90.

Daysofquarter ("2009/05/05") equals 91.


Daysofyear

Daysofyear (year): Returns the number of days that will be included in years after 1900.

Example:

Daysofyear (2008) equals 365, equivalent to Daysofyear ("2008-01-01").


DATEVALUE

DATEVALUE (Date_text): Returns a series number that represents Date_text. This function can be used to convert a date in a text form into a series number.

Date_text: is the text format that represents the date in the spreadsheet date format. For example "2000/2/28"

Note:

Finereport saves the date as a series number, and a series number represents a date that matches it to make it easier for the user to calculate the date numerically. In 1900

In the date system, the Permanent office spreadsheet will save January 1, 1900 as series number 2, Save January 2, 1900 as series number 3, save January 3, 1900

For series number 4 ... And so on As in the 1900 date system, January 1, 1998 is saved as series number 35796.

Example:

DATEVALUE ("2000/1/1") equals 36526.


HOUR

HOUR (Serial_number): Returns the number of hours for a specified time. The hour function specifies an integer that is between 0 (0:00) and 23 (23:00).

Serial_number: Contains the time of the hour being asked.

Example:

HOUR ("11:32:40") equals 11.


MINUTE

MINUTE (Serial_number): Returns the number of minutes of a specified time, which is an integer between 0 and 59.

Serial_number: Contains the time for the number of minutes to be asked.

Example:

MINUTE ("15:36:25") equals 36.


MONTH

Month: (serial_number) Returns the months of the date. The month is a number between 1 and 12.

Serial_number: Contains the date of the month of the request.

Note:

Finereport saves the date as a series number, and a series number represents a date that matches it to make it easier for the user to calculate the date numerically.

In the 1900 date system, the Finereport spreadsheet will be saved as series number 2 in January 1, 1900, saving January 2, 1900 as series number 3,

Save January 3, 1900 as series number 4 ... And so on As in the 1900 date system, January 1, 1998 is saved as series number 35796.

Example:

MONTH ("2004/5/5") equals 5.

MONTH (35796) equals 1.


Monthdelta

Monthdelta (Date,delta): Returns the date of the delta months after a specified date.

Example:

Monthdelta ("2008-08-08", 4) equals 2008-12-08.


Now

Now (): Gets the current time.

Example:

If the system time is 15 points, 18 minutes, 38 seconds,

Then now () equals 15:18:36.


SECOND

SECOND (Serial_number): Returns the number of seconds in a specified time, which is an integer between 0 and 59.

Serial_number: Contains the time of the number of seconds to be asked.

Example:

SECOND ("15:36:25") equals 25.

SECOND ("15:36:25", "HH:mm:ss") equals 25.


Time

Time (Hour,minute,second): Returns a decimal that represents a specified number of times. The time between 0:00:00 (12:00:00 a.m.) and 23:59:59 (11:59:59 p.m.) returns the corresponding value from 0 to 0.99999999.

Hour: A number between 0 and 23.

Minute: A number between 0 and 59.

Second: A number between 0 and 59.

Example:

Time (14,40,0) equals 2:40 PM.

Time (19,43,24) equals 7:43 PM.


TODATE

The TODATE () function converts parameters of various date forms to date types.

It has three types of parameters:

The 1 parameter is a date-type parameter, so the parameter is returned directly.

Example:

TODATE (Date (2007,12,12)) returns the date composed of December 12, 2007.

The 2 parameter returns the corresponding time in milliseconds starting from January 1, 1970 0:0 0 seconds.

Example:

TODATE (1023542354746) returns June 8, 2002.

The 3 parameter is the date format text, then returns the date that the text corresponds to.

Example:

TODATE ("2007/10/15") returns the date formed on October 5, 2007.

TODATE ("2007-6-8") returns the date formed on June 8, 2007.

4 has two parameters, the first parameter is a date-formatted text, and the second argument is the format used to parse the date.

Example:

TODATE ("1/15/07", "Mm/dd/yy") returns the date formed on January 15, 07.

Note: The month in this format must be uppercase mm, year lowercase: yy (not yyyy). Day lowercase: dd.


TODAY

Today (): Gets the current date.

Example:

If the system date is September 10, 2005

Then today () equals 2005/9/10.


WEEKDAY

WEEKDAY (Serial_number): Gets the date and returns the day of the week. The return value is an integer between 0 and 6 that represents one day of the week (from Sunday to Saturday).

Serial_number: the date entered

Note:

Finereport saves the date as a series number, and a series number represents a date that matches it to make it easier for the user to calculate the date numerically.

In the 1900 date system, the Finereport spreadsheet will be saved as series number 2 in January 1, 1900, saving January 2, 1900 as series number 3,

Save January 3, 1900 as series number 4 ... And so on As in the 1900 date system, January 1, 1998 is saved as series number 35796.

Example:

WEEKDAY ("2005/9/10") equals 6 (Saturday).

WEEKDAY ("2005/9/11") equals 0 (Sunday).

WEEKDAY (35796) equals 4 (Thursday).


WEEKNUM

WEEKNUM (Serial_num): Returns a number that represents the week ordinal of a year.

Serial_num: Represents the date entered.

Note:

Finereport saves the date as a series number, and a series number represents a date that matches it to make it easier for the user to calculate the date numerically.

In the 1900 date system, the Finereport spreadsheet will be saved as series number 2 in January 1, 1900, saving January 2, 1900 as series number 3,

Save January 3, 1900 as series number 4 ... And so on As in the 1900 date system, January 1, 1998 is saved as series number 35796.

Example:

WEEKNUM ("2005/1/1") equals 1.

WEEKNUM ("2005/1/6") equals 2.

WEEKNUM (35796) equals 1.


Year

Year: (Serial_number) returns years in the date. Year is a number between 1900 and 9999.

Serial_number: Date containing the year of the request.

Note:

Finereport saves the date as a series number, and a series number represents a date that matches it to make it easier for the user to calculate the date numerically.

In the 1900 date system, the Finereport spreadsheet will be saved as series number 2 in January 1, 1900, saving January 2, 1900 as series number 3,

Save January 3, 1900 as series number 4 ... And so on As in the 1900 date system, January 1, 1998 is saved as series number 35796.

Example:

Year ("2000/1/1") equals 2000.

Year ("2006/05/05") equals 2006.

Year ("1997/04/20") equals 1997.

Year (35796) equals 1998.


Yeardelta

Yeardelta (Date,delta): Returns the date of the delta year after the specified date.

Example:

Yeardelta ("2008-10-10", 10) equals 2018-10-10.

Web Reporting Tools Finereport usage Summary of common functions (date and time functions)

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.