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.
ddmmyy日付をNOT形式に変換するのに苦労していますddmmyyyy。
ddmmyy
ddmmyyyy
このconvert関数はあらゆる種類の巧妙な書式設定を可能にしますが、REPLACE.
convert
REPLACE
どんな助けでも大歓迎です。
dd/mm/yy はイギリス/フランスの標準なので、これを試してください:
SELECT REPLACE(CONVERT(CHAR(8), [MyDateTime], 3), '/', '')
SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 5),'-','')
フォーマット番号5はdd-mm-yyを実行し、-を削除できます