DateToString - spectrum_spatial - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2025-09-26
ft:lastPublication
2025-09-26T10:03:58.880000

Description

Converts a Date into a string.

Syntax

DateToString ( date, fmt )

Arguments

date is a date, and

fmt is a string identifying how to format the date.

Example

Converts a date to a formated string mm-dd-yy for all features where the country is Canada.

select DateToString(RANDOMDATE, 'mm-dd-yy') from countries where country='Canada'

Remarks

For more information about the meaning of the fmt argument, see Date and Time Format Strings section.

Note: DateToString works with both Date and DateTime values.