Skip to content

Commit

Permalink
docs: add missing links
Browse files Browse the repository at this point in the history
  • Loading branch information
dstala committed Mar 28, 2024
1 parent edf5f6f commit 1475507
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ This function returns the month of the year as an integer between 1 and 12 (incl

---

## HOUR
The HOUR function returns the hour of the day as an integer.

#### Syntax
```plaintext
HOUR(datetime)
```

#### Sample
```plaintext
HOUR('2022-03-14 12:00:00') => 12
```

#### Remark
This function returns the hour of the day as an integer between 0 and 23 (inclusive).

---

## Related Articles
- [Numeric and Logical Operators](015.operators.md)
- [Numeric Functions](020.numeric-functions.md)
Expand Down
16 changes: 12 additions & 4 deletions packages/nocodb-sdk/src/lib/formulaHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ interface FormulaMeta {

export const formulas: Record<string, FormulaMeta> = {
AVG: {
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/numeric-functions#avg',
validation: {
args: {
min: 1,
Expand All @@ -296,10 +298,10 @@ export const formulas: Record<string, FormulaMeta> = {
'AVG({column1}, {column2}, {column3})',
],
returnType: FormulaDataTypes.NUMERIC,
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/numeric-functions#avg',
},
ADD: {
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/numeric-functions#add',
validation: {
args: {
min: 1,
Expand All @@ -314,8 +316,6 @@ export const formulas: Record<string, FormulaMeta> = {
'ADD({column1}, {column2}, {column3})',
],
returnType: FormulaDataTypes.NUMERIC,
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/numeric-functions#add',
},
DATEADD: {
docsUrl:
Expand Down Expand Up @@ -376,6 +376,8 @@ export const formulas: Record<string, FormulaMeta> = {
returnType: FormulaDataTypes.DATE,
},
DATESTR: {
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/date-functions#datestr',
validation: {
args: {
rqd: 1,
Expand All @@ -387,6 +389,8 @@ export const formulas: Record<string, FormulaMeta> = {
returnType: FormulaDataTypes.STRING,
},
DAY: {
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/date-functions#day',
validation: {
args: {
rqd: 1,
Expand All @@ -398,6 +402,8 @@ export const formulas: Record<string, FormulaMeta> = {
returnType: FormulaDataTypes.STRING,
},
MONTH: {
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/date-functions#month',
validation: {
args: {
rqd: 1,
Expand All @@ -409,6 +415,8 @@ export const formulas: Record<string, FormulaMeta> = {
returnType: FormulaDataTypes.STRING,
},
HOUR: {
docsUrl:
'https://docs.nocodb.com/fields/field-types/formula/date-functions#hour',
validation: {
args: {
rqd: 1,
Expand Down

1 comment on commit 1475507

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes have been deployed. Please run the following command to verify:

docker run -d -p 8888:8080 nocodb/nocodb-timely:0.204.9-pr-7987-20240328-0354

Please sign in to comment.