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

1,006 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.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2002-02-05

1,232 reads

Blogs

Speeding Up Patching – Beyond Patch Delivery

By

I wear many hats in technology, and one of those is as a (cyber)security...

Monday Monitor Tips: Query Recommendations

By

We keep adding stuff to Redgate Monitor, and it’s easy to miss some of...

A Pursuit of Lifelong Learning

By

The following came across my YouTube feed today. It’s an interview with General James...

Read the latest Blogs

Forums

Azure SQL Hyperscale Unveiled

By Site Owners

Comments posted to this topic are about the item Azure SQL Hyperscale Unveiled

What is the worst part about existing monitoring solutions?

By Evgenii Vaniukov

Hi. What is the most difficult aspect of using monitoring software like idera, redgate,...

MiniMax m3 and SQL Server

By Daniel Calbimonte

Comments posted to this topic are about the item MiniMax m3 and SQL Server

Visit the forum

Question of the Day

SQL Server Vector Support I

What are vectors in SQL Server 2025, as related to the new AI features?

See possible answers