Is this the correct syntax?
FORMAT ( value, format [, culture ] )
Isn't it like that?
FORMAT ( value, format, [ culture ] )
I'm not sure that's why I'm asking.
Best regards!
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
FORMAT ( value, format [, culture ] ) is correct. Parts inside the brackets ([]) are optional. If FORMAT ( value, format, [ culture ] ) were the correct syntax, then when you omit a value for culture you would have to have a trailing comma (,):
SELECT FORMAT(GETDATE(),'dd/MM/yyyy',);
If you try that, you'll get an error.
@trynio -- thank you for your question.
@LarnuUK -- thank you for your answer :^)
I am closing this issue now. You are welcome to @ mention me for any followup.
We hope to hear from you again.