Type Here to Get Search Results !

Online Time and date calculetor ganreted tool 100% Free

Time and Date Calculator

Time and Date Calculator


function calculateTimeDifference(startDateTime, endDateTime) { const startDate = new Date(startDateTime); const endDate = new Date(endDateTime); const timeDifference = endDate - startDate; const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24)); const hours = Math.floor((timeDifference / (1000 * 60 * 60)) % 24); const minutes = Math.floor((timeDifference / (1000 * 60)) % 60); const seconds = Math.floor((timeDifference / 1000) % 60); return { days: days, hours: hours, minutes: minutes, seconds: seconds }; } // Example usage const startDateTime = '2023-06-25 10:00:00'; const endDateTime = '2023-06-26 15:30:00'; const timeDifference = calculateTimeDifference(startDateTime, endDateTime); console.log(`Time difference: ${timeDifference.days} days, ${timeDifference.hours} hours, ${timeDifference.minutes} minutes, ${timeDifference.seconds} seconds`);

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.