DATE() is a versatile function that can be used in two ways: to create a date from individual components (year, month, day) or to convert a string expression to a date. The function supports multiple date formats and can also handle special cases like Julian dates and Unix timestamps.
DATE(year, month, day [, hour, minute, second])
DATE(string)
DATE(string, conversion_mapping_string)
DATE() returns a date value
DATE(2025, 12, 25) = 2025-12-25
DATE(2025, 12, 25, 8, 15, 30) = 2025-12-25 08:15:30
DATE("12/25/2025") = 2025-12-25
DATE("2025-12-25") = 2025-12-25
DATE(0, 0, 0) + 2461234 = 2025-03-26
DATE(1741234567 * 1000) = 2025-03-26
DATE("20251225", "YYYYMMDD") = 2025-12-25
DATE("2025-25-12", "YYYYDDMM") = 2025-12-25
DATE("12252025", "MMDDYYYY") = 2025-12-25
DATE("12/25/2025", "MM/DD/YYYY") = 2025-12-25