Month

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Date and Time >

Month

 

Description

 

Extracts month from string containing DD/MM/YYYY pattern

If used without parameter, returns current month directly.

 

Syntax

 

n = Month[(DateTimeStamp)]

 

Returns

 

Number in range 1..12

 

Parameters

 

Name

Type

Optional

Meaning

DateTimeStamp

String

Yes

Value containing DD/MM/YYYY pattern

 

Remarks

 

Restrictions

 

The passed DateTimeStamp must follow the mentioned signature, otherwise incorrect result can be returned.

 

See also

 

Now, Day, Year, Hour, Minute, Second

 

Examples

 

 

 

Long currentMonth = Month(Now)

Long monthFromString = Month("I don't remember what is special about 12/06/2015, do you?")

Long currentMonthDirect = Month