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

<<  February 2026  >>
MoTuWeThFrSaSu
2627282930311
2345678
9101112131415
16171819202122
2324252627281
2345678

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

""If everyone is thinking alike, someone isn't thinking.""
- General George Patton Jr