You are on page 1of 2

****************************************************

** Sacer Hora, Minuto y Segundo


select cast(datepart(hour,@a) as char(2))+':'+cast(datepart(minute,@a) as char(2))
+':'+
cast(datepart(second,@a) as char(2)) as hora

select convert(char(8), getdate(), 108) as [hh:mm:ss]

****************************************************

string phrase = "The quick brown fox jumps over the lazy dog.";
string[] words = phrase.Split(' ');

foreach (var word in words)


{
System.Console.WriteLine($"<{word}>");
}

****************************************************

string phrase = "The quick brown fox jumps over the lazy dog.";
string[] words = phrase.Split(' ');

foreach (var word in words)


{
System.Console.WriteLine($"<{word}>");
}

****************************************************

char[] delimiterChars = { ' ', ',', '.', ':', '\t' };

string text = "one\ttwo three:four,five six seven";


System.Console.WriteLine($"Original text: '{text}'");

string[] words = text.Split(delimiterChars);


System.Console.WriteLine($"{words.Length} words in text:");

foreach (var word in words)


{
System.Console.WriteLine($"<{word}>");
}

****************************************************

char[] delimiterChars = { ' ', ',', '.', ':', '\t' };

string text = "one\ttwo :,five six seven";


System.Console.WriteLine($"Original text: '{text}'");

string[] words = text.Split(delimiterChars);


System.Console.WriteLine($"{words.Length} words in text:");

foreach (var word in words)


{
System.Console.WriteLine($"<{word}>");
}
****************************************************

string[] separatingStrings = { "<<", "..." };

string text = "one<<two......three<four";


System.Console.WriteLine($"Original text: '{text}'");

string[] words = text.Split(separatingStrings,


System.StringSplitOptions.RemoveEmptyEntries);
System.Console.WriteLine($"{words.Length} substrings in text:");

foreach (var word in words)


{
System.Console.WriteLine(word);
}

****************************************************

****************************************************

****************************************************

****************************************************

You might also like