INSERT Statement date format
ABarthen
Posts: 4 New member
in SQL Prompt
Hi,
Is there any way to change the format of the date default value inserted by SQL prompt when auto completing an INSERT statement?
Currently date fileds get filled with the current date in the format yyyy-MM-dd HH:mm:ss.
This does not work on our (german) versions of SQL Server/Studio, "-" between the days/Months is not valid.
We require date in ISO yyyyMMdd HH:mm:ss format. Simply GETDATE() also works, which is what I usually replace these values with.
Is there currently a ways to change this format (or use GETDATE instead of the current date as a string)?
Is there any way to change the format of the date default value inserted by SQL prompt when auto completing an INSERT statement?
Currently date fileds get filled with the current date in the format yyyy-MM-dd HH:mm:ss.
This does not work on our (german) versions of SQL Server/Studio, "-" between the days/Months is not valid.
We require date in ISO yyyyMMdd HH:mm:ss format. Simply GETDATE() also works, which is what I usually replace these values with.
Is there currently a ways to change this format (or use GETDATE instead of the current date as a string)?
Tagged:
Best Answer
-
AlessandroAlpi Posts: 91 Gold 2hey @ABarthen,
what is the SQL Prompt version you're speaking of? When I write the INSERT statement the default value for datetimes is GETDATE() right now (SQL Prompt 9.1.1.4243).Alessandro Alpi
CTO @ Engage IT Services s.r.l.
Database Administrator and Team Leader
Microsoft MVP - Data Platform
Staff member of getlatestversion.it community
personal website | blog
Answers
I was not aware there was a newer Version, I reinstalled this only a few months ago (before that date fields were not autofilled at all)
I will check out the new version (assuming we have the license for that, don't really know about that).
Thank you for your quick reply.
CTO @ Engage IT Services s.r.l.
Database Administrator and Team Leader
Microsoft MVP - Data Platform
Staff member of getlatestversion.it community
personal website | blog
Also, if you are on the freequent update branch, the currently latest version shouldn't be on 9.1.2 when you're on 9.1.1.
What is the version of your SQL Server?
CTO @ Engage IT Services s.r.l.
Database Administrator and Team Leader
Microsoft MVP - Data Platform
Staff member of getlatestversion.it community
personal website | blog
I am using SQL Server Management Studio 17.4 (14.0.17213.0)
CTO @ Engage IT Services s.r.l.
Database Administrator and Team Leader
Microsoft MVP - Data Platform
Staff member of getlatestversion.it community
personal website | blog