How to Convert Time In a Specific Format

@AKM_Robinuzzaman

You can proceed like this

image

TimeSpan.FromSeconds(
	(CInt("0"+System.Text.RegularExpressions.Regex.Match(inputTime, "\d{1,2}(?=h)").ToString)*60*60)+
	(CInt("0"+System.Text.RegularExpressions.Regex.Match(inputTime, "\d{1,2}(?=m)").ToString)*60)+
	CInt(System.Text.RegularExpressions.Regex.Match(inputTime, "\d{1,2}(?=s)").ToString)
	)

Output

image

image

image

2 Likes