Technical Article

Date/Time formatting function

T-SQL analog for Visual Basic FORMAT function. Created for MSSQL 2000. Works regardless of language settins on server or client side! fn_format('YYYY/DD/MM HH:MI','2002-03-13 12:00') = '2002/13/03 12:00' fn_format('DD.MM.YY','2002-03-13 12:00:00') = '13.03.02' fn_format('HH:MI:SS','2002-03-13 12:00:00') = '12:00:00'

You rated this post out of 5. Change rating

2002-02-05

966 reads

Technical Article

Splitting string of values to table

This function can convert string with separated values to table. Exclusive feature: items inside quotes will not be splitted! Now you can easily perform joins on CSV strings! For expample: fn_split('1, 2, ''3, 4'', 5',',')= 1 2 3, 4 5 First parameter - string with values, second - delimiter character.

5 (1)

You rated this post out of 5. Change rating

2002-02-05

1,173 reads

Blogs

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Webinar – Microsoft Fabric for Dummies

By

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

Read the latest Blogs

Forums

Stored Procedures - passed string than variable length

By Arthur Kirchner

Dear all, I was just wondering: Can you change the default behaviour as illustrated...

Multi row tally query with max value

By ibbo14

Hello folks, I would be very grateful if someone could assist me with this...

Looking for a Recommended Azure SQL Managed Instance Book

By shew

Can anyone recommend an Azure SQL Managed Instance book? I'm looking for information about...

Visit the forum

Question of the Day

The Backup File Extension

I run this command in SQL Server 2022. What is the extension of the backup file?

BACKUP DATABASE HerdofTwo TO DISK = 'HerdOfTwo_20240501'

See possible answers