Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
cast a timestamp in a varchar field in different format to timestamp |
Thu, Aug 22 2019 10:13 AM | Permanent Link |
Yusuf Zorlu MicrotronX - Speditionssoftware vom Profi | We have a field, where the timestamp is in "dd.mm.yyyy hh:nn:ss", i.e. "18.08.2019 12:22:50".
is there a better way to convert this to a timestamp than that i use at the moment: cast(substring(myvarcharfield,7,4)+'-'+substring(myvarcharfield,4,2)+'-'+substring(myvarcharfield,1,2)+' '+substring(myvarcharfield,12,8) as timestamp) -- Yusuf Zorlu MicrotronX |
Thu, Aug 22 2019 10:16 AM | Permanent Link |
Yusuf Zorlu MicrotronX - Speditionssoftware vom Profi | Wow, sorry, but now i have found a better way with cast i have not seen before:
cast(oestatustext2 as timestamp DATE FORMAT 'DD.MM.YYYY'), So this seems to be the best way, -- Yusuf Zorlu MicrotronX |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |