I want to store time 11:22:33 in table, but the time is stored like this 112233. How to insert :
between the string
String text = "txtucrtime.Text,HH:MM:SS";
var split = Regex.Split(text, @"(?<=[:::])");
I want to store time 11:22:33 in table, but the time is stored like this 112233. How to insert :
between the string
String text = "txtucrtime.Text,HH:MM:SS";
var split = Regex.Split(text, @"(?<=[:::])");
See this question: Best way to store time (hh:mm) in a database
Assuming you want to store the time of day, store as an integer which represents the smallest precision you want. If you want to store time in seconds:
hours * 60 * 60
+ minutes * 60
+ seconds
If you want to store to the millisecond, multiple each of the values by 1000 prior to adding them, then also add the milliseconds portion of your time value.