DATETIMEFROMPARTS function – SQL Server Denali
This function is new to SQL Server denali to return datetime value from the input given. This function is similar to DATETIME2FROMPARTS however here we don’t have fractions and precision argument instead we have milliseconds argument here. If the arguments are not valid then an error is raised or if the argument is NULL then it will return a NULL value.
Syntax is below
DATETIMEFROMPARTS ( year, month, day, hour, minute, seconds, milliseconds )
Lets try with example
SELECT DATETIMEFROMPARTS(2011,09,02,23,55,9,54)

Tags: administration, datetimefromparts, denali, sql server 2011, TSQL
Trackback from your site.
Amit Bhatt
| #
Hi Deepak,
Thanks for such a nice article.
You missed one thing to add in code:
@article = ‘all’,
Hence the script will be like this:
EXEC sp_addsubscription
@publication = ‘mypublication’,
@article = ‘ALL’,
@subscriber = ‘Subscriberservername’,
@destination_db = ‘mydestinationdbname’,
@reserved=’Internal’
Error 18486 | Platformblog
| #
[...] SQL-Articles » Troubleshooting Login failed Error 18456This is one of the infamous error message (and number) that most of the DBAs …. 18486. Login failed for user ‘%.*ls’ because the account is currently locked out. [...]
Setting and Changing Collation – SQL Server 2008 « Blog
| #
[...] to sql-articles.comRead more: http://sql-articles.com/articles/dba/how-to-change-server-collation-in-sql-server-2008/#ixzz1pu2S8XW… Like this:LikeBe the first to like this [...]
VidhyaSagar
| #
Naveen,
I’ll check this out and get back to you.
balakiran
| #
Thanks man, Very simple & easy to understand !!!!