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,172 reads

Blogs

Extended Events in Azure Data Studio

By

I know I can use extended events (xevents) in Azure SQL DB when in...

Azure Workbooks

By

I’m saddened that the Workspace Summary is being deprecated in Log Analytics Workspace. I...

SQL Prompt Tips–Using $surroundtext$ in a Snippet

By

A user on the SQL Community Slack was asking about what the $surroundtext$ variable....

Read the latest Blogs

Forums

Creating Aggregates

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Creating Aggregates

Getting Started with DDL statements of Cassandra Query Language

By Shivayan Mukherjee

Comments posted to this topic are about the item Getting Started with DDL statements...

The Balanced Technical Manager

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Balanced Technical Manager

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers