# Tag Archives: date-time-program (adsbygoogle = window.adsbygoogle || []).push({});

## Python program to convert seconds into hours, minutes and seconds

Given an integer n (in seconds), convert it into hours, minutes and seconds. Examples: Input : 12345 Output : 3:25:45 Input : 3600 Output :… Read More »

## Python program to find day of the week for a given date

Write a Python program to find the day of the week for any particular date in the past or future. Let the input be in… Read More »

## Program for converting hours into minutes and seconds

Given an integer n which is the number of hours, the task is to convert it into minutes and seconds. Examples: Input: 5 Output: Minutes… Read More »

## Python program to calculate age in year

Given birth date in y/m/d format, write a Python program to find the present age in years. Examples: Input : 1997/2/3 Output : 21 years… Read More »

## Python program to find number of days between two given dates

Given two dates, Write a Python program to find the total number of days between them. Examples: Input : dt1 = 13/12/2018, dt2 = 25/2/2019… Read More »

## Convert timestamp to readable date/time in PHP

Problem: Convert timestamp to readable date/time in PHP Solution: This can be achieved with the help of date() function, which is an inbuilt function in… Read More »

## Convert String to Date in Java

Given a String in date format, the task is to convert this String into actual Date. Examples: Input: string = “2018-10-28T15:23:01Z” Output: 2018-10-28T15:23:01Z Input: string… Read More »

## PHP | Number of week days between two dates

You are given two string (dd-mm-yyyy) representing two date, you have to find number of all weekdays present in between given dates.(both inclusive) Examples: Input… Read More »

## PHP | Converting string to Date and DateTime

Converting the string to Date and DateTime uses several functions/methods like strtotime(), getDate(). We will see what these functions do. strtotime() – This is basically… Read More »

## Convert time from 24 hour clock to 12 hour clock format

Given a time in a 24-hour clock (military time), convert it to 12-hour clock format. Note: Midnight is 00:00:00 on a 24-hour clock and 12:00:00… Read More »

## Print day of week using Gregorian Calendar in java

Given a date, you have to print the day of the week. Examples: Input : 2018 3 26 Output : Mon Input : 2010 8… Read More »

## Program to Convert Milliseconds to a Date Format in Java

Given milliseconds. The task is to write a program in Java to convert Milliseconds to a Date which Displays the date in dd MMM yyyy… Read More »

## Time difference between expected time and given time

Given the initial clock time h1:m1 and the present clock time h2:m2, denoting hour and minutes in 24-hours clock format. The present clock time h2:m2… Read More »

## mktime() function in C++ STL

The mktime() is an inbuilt C++ function which converts the local calendar time to the time since epoch and returns the value as an object… Read More »

## Comparing dates in Python

Comparing dates is quite easy in Python. Dates can be easily compared using comparison operators (like , =, != etc.). Let’s see how to compare… Read More »