Search

Get

Last Updated: Nov 4, 2020

Articles

Use this function to fetch the value of the day, month, or year field from the given date.

Syntax

Get (input_date, field_name)

Parameters

Input Parameter Name Description
input_date given date in the format of %d-%m-%Y
For more information, refer to the below table Date Format.
field_name Field to fetch the value
Accepted field names are: year, month, and day

Sample

  1. Get (28-10-2020, ‘year’) = 2020
  2. Get (28-10-2020, ‘month’) = 10

Date Format

Code Meaning Example
%d Day of the month as a zero-padded decimal number 30
%-d Day of the month as a decimal number (Platform specific) 30
%m Month as a zero-padded decimal number 09
%B Month as locale’s full name September
%b Month as locale’s abbreviated name Sep
%y Year without century as a zero-padded decimal number 20
%Y Year with century as a decimal number 2020

To view all the Date functions, click here.

Did you find what you were looking for?