I am trying to convert a char(24) field to datetime but it does not work, please help?
A sample data would be:
SELECT top 1 convert(datetime, '2014-03-05 17:03:18.518') from CounterData
and obviously it works. However, when I replace the date and time data with the field name which has the data type of char(24), it fails:
select top 1 convert(datetime, CounterDateTime) from CounterData
(The above query also should return '2014-03-05 17:03:18.518')
The error message is:
Conversion failed when converting date and/or time from character string.
How can I make this work easily without managing the data char by char? By the way, I am using MS SQL 2008.
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
Long way back, we had to take help from third party tools in order to encrypt and decrypt data. Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email
Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…