Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
varchar には ddmmyyyy hh:mm:mm:ss 形式の日付が含まれています
形式 dd/mm/yyyy hh:mm:ss で日時に変換したい
それを行う方法があれば教えてください
declare @datestr varchar(20) set @datestr = '31122012 10:00:00' select convert(datetime, substring(@datestr, 1, 2) + '/' + substring(@datestr, 3, 2) + '/' + substring(@datestr, 5, 10), 103)