Answers for "date and time to time ago dart"

0

how to compare current date and time with another date and time in android

Date date1 = calendar1.getTime();
Date date2 = calendar2.getTime();
if (date1.compareTo(date2) > 0)
{    Log.i("app", "Date1 is after Date2");} 
else if (date1.compareTo(date2) < 0) 
{    Log.i("app", "Date1 is before Date2");} 
else if (date1.compareTo(date2) == 0) 
{    Log.i("app", "Date1 is equal to Date2");}
Posted by: Guest on April-28-2020
0

tuto date and time python

# import datetime class from datetime module
from datetime import datetime

# get current date
datetime_object = datetime.now()
print(datetime_object)
print('Type :- ',type(datetime_object))
Posted by: Guest on February-16-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language