Click here to Skip to main content
15,902,854 members
Home / Discussions / C#
   

C#

 
AnswerRe: Using iTextSharp to Convert Tiff files to PDF Pin
Christian Graus10-Sep-09 11:42
protectorChristian Graus10-Sep-09 11:42 
GeneralRe: Using iTextSharp to Convert Tiff files to PDF Pin
Mondis10-Sep-09 16:01
Mondis10-Sep-09 16:01 
GeneralRe: Using iTextSharp to Convert Tiff files to PDF Pin
Christian Graus10-Sep-09 16:10
protectorChristian Graus10-Sep-09 16:10 
GeneralRe: Using iTextSharp to Convert Tiff files to PDF Pin
Mondis10-Sep-09 16:27
Mondis10-Sep-09 16:27 
AnswerRe: Using iTextSharp to Convert Tiff files to PDF Pin
carlecomm23-Sep-09 2:20
carlecomm23-Sep-09 2:20 
GeneralRe: Using iTextSharp to Convert Tiff files to PDF Pin
Mondis23-Sep-09 2:37
Mondis23-Sep-09 2:37 
Questionproblem clalculating hours and minutes Pin
Jassim Rahma10-Sep-09 8:20
Jassim Rahma10-Sep-09 8:20 
AnswerRe: problem clalculating hours and minutes Pin
OriginalGriff10-Sep-09 8:27
mveOriginalGriff10-Sep-09 8:27 
jrahma wrote:
how can I calculate the total hours and minutes between two DateTimes? I tried this code but it's getting it correctly..

TimeSpan time_difference = DateTime.Now - Convert.ToDateTime(gridComputers.GetRowCellValue(i, "start_time"));

double usage_hours = time_difference.TotalHours;
double usage_minutes = usage_hours - ((int)usage_hours * 60);
string total_usage = String.Format("{0}h {1}m", (int)usage_hours, (int)usage_minutes);


If it is getting it correctly, then I don't see you have a problem!

Actually I do, but never mind. Why are you playing with
double usage_minutes = usage_hours - ((int)usage_hours * 60);

Why not use
double usage_minutes = tume_difference.TotalMinutes;


See example here[^]

No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.

This message is made of fully recyclable Zeros and Ones

GeneralRe: problem clalculating hours and minutes Pin
Not Active10-Sep-09 8:45
mentorNot Active10-Sep-09 8:45 
GeneralRe: problem clalculating hours and minutes Pin
OriginalGriff10-Sep-09 8:53
mveOriginalGriff10-Sep-09 8:53 
GeneralRe: problem clalculating hours and minutes Pin
Luc Pattyn10-Sep-09 9:55
sitebuilderLuc Pattyn10-Sep-09 9:55 
GeneralRe: problem clalculating hours and minutes Pin
OriginalGriff10-Sep-09 10:03
mveOriginalGriff10-Sep-09 10:03 
GeneralRe: problem clalculating hours and minutes Pin
Luc Pattyn10-Sep-09 10:16
sitebuilderLuc Pattyn10-Sep-09 10:16 
GeneralRe: problem clalculating hours and minutes Pin
DaveyM6910-Sep-09 22:13
professionalDaveyM6910-Sep-09 22:13 
AnswerRe: problem clalculating hours and minutes Pin
0x3c010-Sep-09 8:36
0x3c010-Sep-09 8:36 
AnswerRe: problem clalculating hours and minutes Pin
carlecomm23-Sep-09 1:10
carlecomm23-Sep-09 1:10 
QuestionIs there a way to registry factories when an assembly is loaded? Pin
k66610-Sep-09 8:01
k66610-Sep-09 8:01 
AnswerRe: Is there a way to registry factories when an assembly is loaded? Pin
Not Active10-Sep-09 8:35
mentorNot Active10-Sep-09 8:35 
Questionstrong name verification Pin
amit_upadhyay10-Sep-09 7:49
amit_upadhyay10-Sep-09 7:49 
AnswerRe: strong name verification Pin
I Believe In GOD10-Sep-09 12:08
I Believe In GOD10-Sep-09 12:08 
QuestionProblem with Visio ExportAsFixedFormat Pin
NarVish10-Sep-09 6:15
NarVish10-Sep-09 6:15 
AnswerRe: Problem with Visio ExportAsFixedFormat Pin
carlecomm23-Sep-09 1:06
carlecomm23-Sep-09 1:06 
GeneralRe: Problem with Visio ExportAsFixedFormat Pin
NarVish23-Sep-09 1:45
NarVish23-Sep-09 1:45 
AnswerRe: Problem with Visio ExportAsFixedFormat Pin
NarVish23-Sep-09 6:24
NarVish23-Sep-09 6:24 
QuestionRegular expression Pin
karmjit43510-Sep-09 2:41
karmjit43510-Sep-09 2:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.