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'

2002-02-05

958 reads

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)

2002-02-05

1,166 reads

Blogs

Clustering SAP #ASCS and #ERS on #AWS using Windows Server Failover Clustering

By

When ensuring high availability for SAP ASCS and ERS running on WIndows Server, the...

Heading Font Weights and List View Toggles Arrive in Block Editor and WordPress 5.8

By

With the WordPress 5.8 release, we're starting to introduce features that overall improve your...

My Application is Getting SQL Timeout Errors, But What Query is the Problem?

By

This is something that comes up time and time again. A developer or member...

Read the latest Blogs

Forums

convert hours into decimal

By jeannier1975

i have a formula that calculates the difference between two dates and tells me...

Get charges percentage per entity\channel

By Bruin

I trying to figure out what percentage of the total charge for a ME...

How to find islands and get max and min range values

By itlk

I am trying to create groups for each Name and save the max and...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers