Format values for clients and convert between supported formula types.
Use conversion functions at data boundaries: imported text, integration values, locale-specific numbers and dates, and calculated text shown to a client.
Requires: a numeric, date, time, or timestamp value. Number formatting accepts an optional pattern, unit, and culture. Date/time/timestamp formatting accepts a pattern and optional culture.
Returns: Text.
Best for: totals, units, percentages, dates, and times shown in forms or print output.
Converts a boolean, number, text value, or null into a boolean.
Syntax:ToBoolean(value)
Requires: a boolean, numeric, or text value. Non-zero numbers are true. Text is true only for 1, true, or yes, ignoring case and surrounding spaces. null is false.
Returns: Boolean.
Best for: normalising imported flags before a condition.
Prints a supported value as text using TeamDesk-compatible forms.
Syntax:ToText(value)
Requires: text, numeric, boolean, date, time, timestamp, duration, user, or null.
Returns: Text, or null when the input is null.
Best for: explicitly converting a value before joining or sending it.
Concat("Quantity: ", ToText([Quantity]))
Numbers are printed with six decimal places, booleans as 1 or 0, and users by display name. Use Format when the presentation needs a specific pattern or culture.
Convert at the edge of a formula, then keep the resulting value typed while you calculate.
Last modified on September 7, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FarmTrace documentation","description":"Public guidance for FarmTrace Dsync, Device Kit, and the formula language.","colors":{"primary":"#1B6F45","light":"#4ADE80","dark":"#278A56"},"logo":{"light":"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/logo/light.svg?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=a32d62b068cf7f7610b6dbdfe9819f6a","dark":"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/logo/dark.svg?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=f209a8925c59e1d88e8f71da098175b7","href":"https://farmtrace.co.za"},"favicon":"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/favicon.png?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=cdb3c190e3d23b4128d11251a1cac33b","appearance":{"default":"system"},"background":{"decoration":"gradient","color":{"light":"#F3F4F1","dark":"#0B1F12"}},"navbar":{"links":[{"href":"https://farmtrace.co.za","label":"FarmTrace website"},{"href":"mailto:support@farmtrace.co.za","label":"Support"}],"primary":{"type":"button","label":"Visit FarmTrace","href":"https://farmtrace.co.za"}},"seo":{"indexing":"all"},"fonts":{"family":"Geist"},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"farmtrace","hasAudioNarration":false,"actualSubdomain":"farmtrace","customDomains":["docs.farmtrace.co.za"],"gitSource":{"type":"github","owner":"farmtracedev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6a9ecfb050567d98f662842a","collectionId":"820c3df3-54bd-4eda-b24a-9dc94f6432f1","liveDeploymentHistoryId":"6a9ecfb050567d98f662842a","schemaVersion":"v3"},"entitlements":{},"buildId":"6a9ecfb050567d98f662842a","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Dsync","count":34},{"language":"default","tag":"Formula reference","count":16},{"language":"default","tag":"Configuration","count":8},{"language":"default","tag":"Device Kit","count":5},{"language":"default","tag":"Device Kit guides","count":5},{"language":"default","tag":"Function setup","count":4},{"language":"default","tag":"Dsync guides","count":3},{"language":"default","tag":"Formula language","count":3},{"language":"default","tag":"Start here","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"reference/conversion","slug":"/reference/conversion","pageMetadata":{"title":"Conversion functions","description":"Format values for clients and convert between supported formula types.","href":"/reference/conversion"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Format values for clients and convert between supported formula types.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Use conversion functions at data boundaries: imported text, integration values, locale-specific numbers and dates, and calculated text shown to a client.`}),`\n`,_jsx(Heading,{level:`2`,id:`format`,children:_jsx(_components.code,{children:`Format`})}),`\n`,_jsx(_components.p,{children:`Formats a number, date, time, or timestamp as client-facing text.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`Format(value[, pattern[, unitOrCulture[, culture]]])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a numeric, date, time, or timestamp value. Number formatting accepts an optional pattern, unit, and culture. Date/time/timestamp formatting accepts a pattern and optional culture.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Text.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` totals, units, percentages, dates, and times shown in forms or print output.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Format(12.5, \"0.0 $\", \"kg\", \"en-US\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Format(#2026-08-31#, \"dd MMM yyyy\", \"en-ZA\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Culture values use language tags such as `,_jsx(_components.code,{children:`en-ZA`}),`, `,_jsx(_components.code,{children:`en-US`}),`, or `,_jsx(_components.code,{children:`de-DE`}),`. A number pattern can also use standard forms such as `,_jsx(_components.code,{children:`N2`}),`, `,_jsx(_components.code,{children:`F2`}),`, `,_jsx(_components.code,{children:`P1`}),`, `,_jsx(_components.code,{children:`C2`}),`, or `,_jsx(_components.code,{children:`E3`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`toboolean`,children:_jsx(_components.code,{children:`ToBoolean`})}),`\n`,_jsxs(_components.p,{children:[`Converts a boolean, number, text value, or `,_jsx(_components.code,{children:`null`}),` into a boolean.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ToBoolean(value)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a boolean, numeric, or text value. Non-zero numbers are true. Text is true only for `,_jsx(_components.code,{children:`1`}),`, `,_jsx(_components.code,{children:`true`}),`, or `,_jsx(_components.code,{children:`yes`}),`, ignoring case and surrounding spaces. `,_jsx(_components.code,{children:`null`}),` is false.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Boolean.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` normalising imported flags before a condition.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ToBoolean(\"YES\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`todate`,children:_jsx(_components.code,{children:`ToDate`})}),`\n`,_jsx(_components.p,{children:`Converts text to a date, or selects the local calendar date represented by a timestamp.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ToDate(text[, culture])`}),` or `,_jsx(_components.code,{children:`ToDate(timestamp[, timeZone])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` text or a timestamp. Text can include a culture such as `,_jsx(_components.code,{children:`en-GB`}),`; timestamps can include a timezone such as `,_jsx(_components.code,{children:`Africa/Johannesburg`}),` or `,_jsx(_components.code,{children:`GMT+02:00`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Date.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` imported dates and timezone-aware integration timestamps.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ToDate(\"31/08/2026\", \"en-GB\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`tonumber`,children:_jsx(_components.code,{children:`ToNumber`})}),`\n`,_jsx(_components.p,{children:`Converts text or a boolean into a number.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ToNumber(value[, culture])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` text, boolean, numeric, or `,_jsx(_components.code,{children:`null`}),`. The optional culture controls decimal and grouping separators. `,_jsx(_components.code,{children:`true`}),` becomes `,_jsx(_components.code,{children:`1`}),`, `,_jsx(_components.code,{children:`false`}),` and `,_jsx(_components.code,{children:`null`}),` become `,_jsx(_components.code,{children:`0`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Numeric.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` CSV, API, or user-entered numbers that arrive as text.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ToNumber(\"1.234,50\", \"de-DE\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`totext`,children:_jsx(_components.code,{children:`ToText`})}),`\n`,_jsx(_components.p,{children:`Prints a supported value as text using TeamDesk-compatible forms.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ToText(value)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` text, numeric, boolean, date, time, timestamp, duration, user, or `,_jsx(_components.code,{children:`null`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Text, or `,_jsx(_components.code,{children:`null`}),` when the input is `,_jsx(_components.code,{children:`null`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` explicitly converting a value before joining or sending it.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Concat(\"Quantity: \", ToText([Quantity]))`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Numbers are printed with six decimal places, booleans as `,_jsx(_components.code,{children:`1`}),` or `,_jsx(_components.code,{children:`0`}),`, and users by display name. Use `,_jsx(_components.code,{children:`Format`}),` when the presentation needs a specific pattern or culture.`]}),`\n`,_jsx(Heading,{level:`2`,id:`totimeofday`,children:_jsx(_components.code,{children:`ToTimeOfDay`})}),`\n`,_jsx(_components.p,{children:`Converts text to a time of day, or selects the local time represented by a timestamp.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ToTimeOfDay(text[, culture])`}),` or `,_jsx(_components.code,{children:`ToTimeOfDay(timestamp[, timeZone])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` text or a timestamp, plus an optional culture/timezone appropriate to that input.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Time.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` imported appointment times and timezone-aware response timestamps.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ToTimeOfDay(\"11:30 PM\", \"en-US\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`totimestamp`,children:_jsx(_components.code,{children:`ToTimestamp`})}),`\n`,_jsx(_components.p,{children:`Combines a date, optional time, and optional timezone into one timestamp.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ToTimestamp(date[, time[, timeZone]])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a date; optional time defaults to midnight and optional timezone defaults to the current formula timezone.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Timestamp.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` creating an exact moment from separate date and time fields.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ToTimestamp([Inspection Date], [Inspection Time], \"Africa/Johannesburg\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Convert at the edge of a formula, then keep the resulting value typed while you calculate.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Conversion functions","description":"Format values for clients and convert between supported formula types.","href":"/reference/conversion"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Format","slug":"format","depth":2,"children":[]},{"title":"ToBoolean","slug":"toboolean","depth":2,"children":[]},{"title":"ToDate","slug":"todate","depth":2,"children":[]},{"title":"ToNumber","slug":"tonumber","depth":2,"children":[]},{"title":"ToText","slug":"totext","depth":2,"children":[]},{"title":"ToTimeOfDay","slug":"totimeofday","depth":2,"children":[]},{"title":"ToTimestamp","slug":"totimestamp","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"farmtrace","siteName":"FarmTrace documentation","title":"Conversion functions - FarmTrace documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-07T13:14:21.508Z","gitLastModified":"2026-09-07T12:27:48.000Z","originalFileLocation":"reference/conversion.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Format values for clients and convert between supported formula types.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FarmTrace documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Conversion functions - FarmTrace documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Format values for clients and convert between supported formula types.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FarmTrace documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.farmtrace.co.za/reference/conversion\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://farmtrace.mintlify.app/_mintlify/api/og/v2?division=Formula+reference\u0026amp;title=Conversion+functions\u0026amp;description=Format+values+for+clients+and+convert+between+supported+formula+types.\u0026amp;theme=09ecce6343d2410fee452256\u0026amp;signature=7d271cae25afd9957476c8b9098228de7ff3730586be889d62533647d9b5f68c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Conversion functions - FarmTrace documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Format values for clients and convert between supported formula types.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://farmtrace.mintlify.app/_mintlify/api/og/v2?division=Formula+reference\u0026amp;title=Conversion+functions\u0026amp;description=Format+values+for+clients+and+convert+between+supported+formula+types.\u0026amp;theme=09ecce6343d2410fee452256\u0026amp;signature=7d271cae25afd9957476c8b9098228de7ff3730586be889d62533647d9b5f68c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FarmTrace documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1B6F45\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.farmtrace.co.za/reference/conversion\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/conversion.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.farmtrace.co.za/#organization\",\"name\":\"FarmTrace documentation\",\"url\":\"https://docs.farmtrace.co.za\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/logo/light.svg?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=a32d62b068cf7f7610b6dbdfe9819f6a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.farmtrace.co.za#website\",\"name\":\"FarmTrace documentation\",\"url\":\"https://docs.farmtrace.co.za\",\"publisher\":{\"@id\":\"https://docs.farmtrace.co.za/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.farmtrace.co.za/reference/conversion#webpage\",\"url\":\"https://docs.farmtrace.co.za/reference/conversion\",\"name\":\"Conversion functions\",\"description\":\"Format values for clients and convert between supported formula types.\",\"dateModified\":\"2026-09-07T12:27:48.000Z\",\"isPartOf\":{\"@id\":\"https://docs.farmtrace.co.za#website\"},\"breadcrumb\":{\"@id\":\"https://docs.farmtrace.co.za/reference/conversion#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.farmtrace.co.za/reference/conversion#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Formula reference\",\"item\":\"https://docs.farmtrace.co.za/reference/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Conversion functions\",\"item\":\"https://docs.farmtrace.co.za/reference/conversion\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.farmtrace.co.za/reference/conversion#article\",\"headline\":\"Conversion functions\",\"name\":\"Conversion functions\",\"description\":\"Format values for clients and convert between supported formula types.\",\"url\":\"https://docs.farmtrace.co.za/reference/conversion\",\"mainEntityOfPage\":{\"@id\":\"https://docs.farmtrace.co.za/reference/conversion#webpage\"},\"dateModified\":\"2026-09-07T12:27:48.000Z\",\"publisher\":{\"@id\":\"https://docs.farmtrace.co.za/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.farmtrace.co.za#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FarmTrace documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"FarmTrace documentation","nav":{"global":null,"tabs":[{"tab":"Start here","icon":"compass","pages":[{"title":"Start here","href":""}]},{"tab":"Dsync","icon":"sprout","groups":[{"group":"Dsync guides","icon":"book-open","pages":[{"title":"Dsync","href":"/dsync"},{"title":"Field operations","href":"/dsync/field-operations"},{"title":"Sync and connectivity","href":"/dsync/sync-and-connectivity"}]},{"group":"Function setup","icon":"braces","pages":[{"title":"Function setup","href":"/dsync/function-setup"},{"title":"Form fields","href":"/dsync/function-setup/form-fields"},{"title":"Component types","href":"/dsync/function-setup/component-types"},{"title":"Component fields","href":"/dsync/function-setup/component-fields"}]},{"group":"Configuration","icon":"sliders-horizontal","pages":[{"title":"Table Setup Guide","href":"/dsync/table-setup"},{"title":"Table setup fields","href":"/dsync/table-setup/table-fields"},{"title":"Filters and role access","href":"/dsync/table-setup/filters-and-roles"},{"title":"Table screen fields","href":"/dsync/table-setup/screen-fields"},{"title":"Table screens","href":"/dsync/table-setup/table-screen"},{"title":"Reference data and scanning","href":"/dsync/table-setup/reference-data"},{"title":"Configuration patterns","href":"/dsync/table-setup/configuration-patterns"},{"title":"Troubleshooting and limitations","href":"/dsync/table-setup/troubleshooting"}]},{"group":"Formula language","icon":"braces","pages":[{"title":"Write your first formula","href":"/getting-started/write-your-first-formula"},{"title":"Values and references","href":"/getting-started/values-and-references"},{"title":"Formula Contexts","href":"/getting-started/formula-contexts"}]},{"group":"Formula reference","icon":"book-open","pages":[{"title":"Formula index","description":"Browse all 146 supported TeamDesk-compatible functions and 15 operators.","href":"/reference/index"},{"title":"Conversion functions","href":"/reference/conversion"},{"title":"Text functions","description":"Join, inspect, split, clean, pad, and URL-encode client-facing text.","href":"/reference/text"},{"title":"Date functions","href":"/reference/date"},{"title":"Time functions","href":"/reference/time"},{"title":"Timestamp functions","href":"/reference/timestamp"},{"title":"Numeric functions","href":"/reference/numeric"},{"title":"Rounding functions","href":"/reference/rounding"},{"title":"Aggregation functions","href":"/reference/aggregation"},{"title":"Null handling functions","href":"/reference/nulls"},{"title":"Duration functions","href":"/reference/duration"},{"title":"Location functions","href":"/reference/location"},{"title":"Special functions","href":"/reference/special"},{"title":"Session functions","href":"/reference/session"},{"title":"Ask and Parameter","href":"/reference/ask"},{"title":"Operators","href":"/reference/operators"}]}]},{"tab":"Device Kit","icon":"microchip","pages":[{"title":"Device Kit","href":"/device-kit"}]}]},"basePath":"","title":"Conversion functions - FarmTrace documentation","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":[],"chunks":[]}