In sql i will get DateName from the following query
SELECT DATENAME(dw,'10/24/2013') as theDayName
to return 'Thursday'
have any equivalent function in Vertica?
You can try installing a custom UDF ( weekday_name
). Once installed, you can use:
SELECT weekday_name(dayofweek(TO_DATE('10/24/2013','MM/DD/YYYY')))
Use this script, it will produce the desired result in Vertica
SELECT DAYOFWEEK (TIMESTAMP '2014-08-21 05:26:24.000');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.