Format Column or Sequence Value in Numbering Scheme

11.02.2020
Это содержимое недоступно на вашем языке. Вот версия на английском языке.

This article describes how to apply formatting in scheme numbering definition.

Introduction

Vitextra Number Generator allows to automatically generate value for column based on other columns and sequences.

SharePoint Filter Date Time column

Supported Column Types

Number Generator supported the following SharePoint column types:

  • Date and Time
  • Number
  • Counter
  • Integer

📝 Note
Formatting rules are the same for types Number, Counter, and Integer.

Define Formatting

To apply formatting use the syntax:

[DateColumn:format]

DateTime Column Formatting

DateTime formatting can be applied only to Date and Time column type.
Some common values used in format are as follow:

ValueDescriptionValueOutput
yyyyThe year as a four-digit number4/12/1986 9:15:001986
yyThe year, from 00 to 994/12/1986 9:15:0086
MMThe abbreviated name of the month4/12/1986 9:15:00Apr
MMMMThe full name of the month4/12/1986 9:15:00April
dThe day of the month, from 1 through 314/2/1986 9:15:002
ddThe day of the month, from 01 through 314/2/1986 9:15:0002
dddThe abbreviated name of the day of the week4/12/1986 9:15:00Sat
ddddThe full name of the day of the week4/12/1986 9:15:00Saturday
hThe hour in AM/PM from 1 to 124/12/1986 9:15:009
hhThe hour in AM/PM from 01 to 124/12/1986 9:15:0009
HThe hour in 24-hour from 0 to 234/12/1986 9:15:009
HHThe hour in 24-hour from 00 to 234/12/1986 9:15:00 PM21
mThe minute, from 0 through 594/12/1986 9:05:005
mmThe minute, from 00 through 594/12/1986 9:05:0005
ttAM/PM designator4/12/1986 23:15:00PM

Column reference and formatting separated by a colon must be in square brackets.

The Created column formatting to use in numbering scheme:

[Created:yyyy-MM-dd]

Output for value equal to 2/10/2020 11:00AM is 2020-02-10.

📝 Note
The culture which is used to format Date value is determined by the site where the list or library is located.

Number Column Formatting

Number formatting can be applied to number column types as well as sequences.

The following table describes the numeric format specifiers.

SpecifierDescriptionValueFormatOutput
0Replaces the zero with the corresponding digit if one is present2350000000235
#Replaces the # symbol with the corresponding digit if one is present235#####235
.Determines the location of the decimal separator in the result string23.5#.0023.50
,Determines the location of the group separator in the result string1235#,#1,235

📝 Note
0 used to display insignificant zeros when a number has fewer digits than zeros in the format otherwise, zero appears in the result string.

Поделиться