minute

minute

Overview

The minute function takes a date-time or time value and returns the minute value.

Note:

  • The date-time value will be returned in the format specified in application settings.
  • The getMinutes function for time data-type is available only for Zoho Creator as of now.
  • The minute function for time data-type is not available as of now.

Return Type

  • NUMBER

Syntax

<variable>=<dateTimeValue>.minute();

(OR)

<variable>=minute(<dateTimeValue>);

(OR)

<variable>=<timeValue>.minute();

(OR)

<variable>=minute(<timeValue>);

(OR)

<variable>=<dateTimeValue>.getMinutes();

(OR)

<variable>=getMinutes(<dateTimeValue>);

(OR)

<variable>=<timeValue>.getMinutes();

(OR)

<variable>=getMinutes(<timeValue>);

where,

ParameterData typeDescription
<variable>NUMBERVariable which will contain the minutes returned.
<dateTimeValue>

(if the value is date-time)

DATE-TIME

The date-time value from which the minutes component should be obtained.

The date-time value can be specified without a time value, in which case 00:00:00 will be taken as the default time value.

If the hour value is specified as 24 or more, the date-time value be reset to 00:00:00. If the minutes value is specified as 60 or more, the mm:ss value will be reset to 00:00, if the seconds value is specified as 60 or more, the ss value will be reset to 00.

A runtime error will be encountered if:

  • the hour value, or minute value, or second value, is specified in more than 2 digits.
  • the date value exceeds the number of days in that month.
  • an incorrect month value is specified.
  • the year value has more than 4 digits.

Refer date-time data type to learn more about date-time data type.

<timeValue>

(if the value is time)

TIME

The time value from which the minutes component should be obtained.

Time data type is currently supported only in Zoho Creator

TIME values are represented in the formats - hh:mm:ss a (12-hour format) and HH:mm:ss (24-hour format)

A runtime error will be encountered if:

  • Declared time values cannot skip either the seconds part or seconds and minutes parts altogether. In the event the value does not conform to the supported time formats, an error message will be thrown.
  • TIME values in no way should fall outside the 24 hour range. A value declared like "23:59:60" would throw an error.
  • Operations (like addHour, subMinutes) on TIME values which result in a value outside the 24-hour range will also result in an error.

Refer time data type to learn more about time data type.

Examples

Date-Time Examples:

 currentDate='01-Jan-2019';
 info currentDate.getMinutes();// Returns 00
 currentDate='01-Jan-2019 23:15:10';
 info currentDate.minute();// Returns 15

Time Examples (Only for Creator):

 timeValue='10:00:00 PM';
 info timeValue.getMinutes();// Returns 00
 currentTime='13:15:10';
 info currentTime.getMinutes(); // Returns 15

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com