Split

by ssi 12. November 2015 16:34

  sRet = sRet.Replace("DB_backup_", "").Replace(".trn.7z", "");

            char[] delimiter = { '_' };

            string[] split = null;

 

            for (int x = 0; x <= 5; x++)

                split = sRet.Split(delimiter, x);

            string sYr = split[0];

            string sMn = split[1];

            string sDy = split[2];

            string sTm = split[3].Substring(0, 4);

            sRet = string.Format("Last TL from : {0}/{1}/{2} @ {3}", sMn, sDy, sYr, sTm);

            return sRet;

 

Tags: ,

CSharp

Add comment

biuquote
  • Comment
  • Preview
Loading

Calendar

<<  July 2025  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

RecentComments

None

Development Team @ Shelbysys

We develop custom database applications for our clients. Our development tool of choice is MS Visual Studio. 

Quotations

"The distance between insanity and genius is measured only by success."
Bruce Feirstein