![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Tue, Oct 9 2018 6:36 PM | Permanent Link |
Ian Branch | Hi Team,
I am trying to cast the current timestamp to a formatted string. {sql} CAST(Current_TIMESTAMP AS VARCHAR(14) FORMAT "YYYYMMDDHHmmss") {sql} Not having much luck. I have tried several permutations but no luck att. Appreciate being educated on how to do this properly. Regards & TIA, Ian |
Wed, Oct 10 2018 3:11 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Ian
Try CAST(CURRENT_TIMESTAMP AS VARCHAR(14) DATE FORMAT 'YYYYMMDD' TIME FORMAT 'HHmmss') It looks like there's a space between the date & time portions so you may want to do this REPLACE(' ','',CAST(CURRENT_TIMESTAMP AS VARCHAR(14) DATE FORMAT 'YYYYMMDD' TIME FORMAT 'HHmmss')) Roy Lambert |
Wed, Oct 10 2018 6:41 PM | Permanent Link |
Ian Branch | Ah Ha! Tks Roy.
|
This web page was last updated on Monday, July 15, 2024 at 07:03 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |