Jessy Robinson
Jessy Robinson

Reputation: 11

How to convert double to minutes in VB

I am currently storing a value as a double but will need to have the value converted to minutes for another function.

For example 1 would convert to 60 (minutes), 3,5 would equal to 210.

I tried timespan but I'm not getting what I am looking for.

Upvotes: 0

Views: 237

Answers (1)

Mark Seemann
Mark Seemann

Reputation: 233150

TimeSpan.TotalMinutes should give you what you're looking for:

Dim minutes = TimeSpan.FromHours(hours).TotalMinutes

Upvotes: 2

Related Questions