0% found this document useful (0 votes)
35 views8 pages

Mini Project

This case study report from Jayawantrao Sawant College of Engineering focuses on using Python's datetime module to fetch and display the current date and time. It outlines the objectives, real-life applications, and provides a sample program demonstrating the functionality of the module. The report concludes that the datetime module is essential for managing time-related tasks in programming.

Uploaded by

vidyayevale0017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views8 pages

Mini Project

This case study report from Jayawantrao Sawant College of Engineering focuses on using Python's datetime module to fetch and display the current date and time. It outlines the objectives, real-life applications, and provides a sample program demonstrating the functionality of the module. The report concludes that the datetime module is essential for managing time-related tasks in programming.

Uploaded by

vidyayevale0017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

JSPM’s

Jayawantrao Sawant College of Engineering

CASE STUDY REPORT


On

Date , Time in Python using modules

Course Name: Programming & problem solving


Course Code: PCC-151-ITT

(2024 Pattern)
Semester II

Engineering Science Department


2024-25

JSPM’s JSCOE, Hadapsar Page 1


CERTIFICATE

JSPM’s
Jayawantrao Sawant College of Engineering
Department of Engineering Science

This is to certify that, Group No . has successfully completed the case study
activity for First Year (Sem II) for the course “Programming and Problem Solving”. The
case study has been approved as it satisfies the academic requirements in respect of SPPU
Comprehensive and Continuous Assessment and End Sem Examination.

Date:

Group members :-
1. Sharvari Jagtap Roll No.: 1752

2. Bhakti Gaikwad Roll No: 1754

3. Srushti Achalerkar Roll No: 1759

4. Gayatri Bendale Roll No: 1760


5. Leena Bhujbal Roll No: 1762

Subject Teacher HOD


Dr. M.S. Gardi.

JSPM’s JSCOE, Hadapsar Page 2


INDEX

Article Title Page No.


No.
1 Problem Statement: 4

2 Introduction 4

3 Objective 5

4 Real Life applications 5

5 Study of the applications 6

6 Expected output 6

7 Python Implementation 6

A) Program 6

B) Output(Screenshot) 6

8 Conclusion 7

JSPM’s JSCOE, Hadapsar Page 3


1. Problem Statement

In the program below, we import the datetime module. The built-in Python datetime() function
inside the module gives current date & time.

2. Introduction

In any modern software application, dealing with dates and times is crucial. Whether it's recording the time a
user logs in, scheduling automated tasks, timestamping events, or analyzing time-series data, handling date and
time information is a fundamental part of programming. Python offers a powerful and flexible built-in module
called datetime that enables developers to work seamlessly with dates, times, or both combined.

The datetime module is part of Python's standard library, which means you don't need to install any additional
packages—it's ready to use right out of the box. It includes several classes such as date, time, datetime, timedelta,
and tzinfo that allow you to create, manipulate, and format date/time values in a way that is intuitive and
consistent.

Here's a breakdown of what it offers:

Date Handling: You can create and extract year, month, day, and weekday information

⏰ Time Handling: You can work with hours, minutes, seconds, and microseconds.

Combined Date and Time: The datetime class combines both for full timestamp support.

⏳ Time Arithmetic: You can calculate time differences (duration), add or subtract time intervals, and
more.

Time Zones: It includes basic support for time zones (via the tzinfo class) and interoperability with
third-party timezone libraries.

Python’s datetime module is highly versatile and serves as a base for many applications that involve:

Logging timestamps of events

Scheduling tasks

Creating calendars or reminders

Formatting dates for reports or UI’s

Comparing or calculating durations between dates

By mastering this module, developers gain the ability to build more responsive and intelligent applications that
can interact with the real world in meaningful and time-aware ways.

JSPM’s JSCOE, Hadapsar Page 4


A. How we define function in python?
Ans. Syntax-
def function_name(parameters):
# block of code (function body)
return result # optional

 def – keyword to define a function

 function_name – name of the function (should follow naming rules)

 parameters – optional; values you can pass into the function

 return – optional; used to return a result from the function

B. How we call function ?


Ans. In Python, calling a function means executing the code that was defined inside it. To call a
function, you simply write the function’s name followed by parentheses. If the function takes parameters, you
provide the necessary arguments inside the parentheses. For instance, if you defined a function as def
greet(name):, you would call it by writing greet("Alice"), which passes the string "Alice" as an argument to the
function. When the function is called, Python jumps to the function's code, executes it, and returns to the place
where the call was made. If the function has a return value, you can store it in a variable like message =
greet("Alice") or use it directly in an expression. Function calls are essential for reusing code and making
programs modular and organized.

3. Objectives

1. To understand how the Python datetime module works by writing a program that fetches and displays
the current date and time.

4. Real Life applications

1. Logging systems: Timestamp logs when events happen.

2. Reminders & Schedulers: Set alarms, reminders based on specific times.

3. Data Analysis: Time-series data requires datetime for plotting and comparison.

4. Web Development: Display dynamic date and time to users.

JSPM’s JSCOE, Hadapsar Page 5


5. Financial applications: Track transaction times or compute durations.

5. Study of the applications

1. The datetime module is commonly used in real-time tracking systems like banking, e-commerce,
and analytics dashboards.

2. It supports operations such as date comparison, parsing, formatting, and timezone management,
making it ideal for software requiring time sensitivity.

6 . Expected output

The program should display the current system date and time in a human-readable format such as:
Current Date and Time: 2025-04-12 10:45:32

7. Python Implementation

A) Program

Write a program to Displaying current datetime.


# Importing the datetime module
from datetime import datetime

# Fetching current date and time


current_dt = datetime.now()

# Displaying the result


print("Current Date and Time:", current_dt)

B) Output(Screenshot)

JSPM’s JSCOE, Hadapsar Page 6


8. Conclusion
The datetime module is a powerful and easy-to-use tool for managing time-related tasks in Python. This program
demonstrates how to retrieve the current date and time, forming the foundation for building more complex, time-sensitive
applications.

JSPM’s JSCOE, Hadapsar Page 7


JSPM’s JSCOE, Hadapsar Page 8

You might also like