Navigation:  ThinBASIC Modules > Core (thinBasic Core Engine) > Date and Time >

Month

Previous pageReturn to chapter overviewNext page

 

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