🐍

Python DD/MM/YYYY

ප්‍රතිදානය: 15/01/2025
ඉක්මන් යොමුව
ආකෘති තන්තුව
%d/%m/%Y
ප්‍රතිදානය
15/01/2025

Python හි DD/MM/YYYY ලෙස දිනය ආකෘතිගත කිරීම

🐍 Python
from datetime import datetime date = datetime.now() formatted = date.strftime('%d/%m/%Y') print(formatted) # Output: 31/12/2025

දින තන්තුව විග්‍රහ කිරීම

🐍 Python (විග්‍රහය)
from datetime import datetime date_string = '31/12/2025' date = datetime.strptime(date_string, '%d/%m/%Y') print(date) # Output: 2025-12-31 00:00:00

Python දින ආකෘති කේත

කේතය අර්ථය උදාහරණය
%d Day of month (01-31) 31
%m Month (01-12) 12
%Y Year with century 2025
%y Year without century (00-99) 25
%b Abbreviated month name Dec
%B Full month name December
%a Abbreviated weekday Wed
%A Full weekday name Wednesday

Python හි වෙනත් ආකෘති

වෙනත් භාෂාවල DD/MM/YYYY

නිල ලේඛනය

Python හි දින ආකෘතිගත කිරීම ගැන වැඩි විස්තර සඳහා, නිල ලේඛනය බලන්න:

Python දින ලේඛනය →

අදාළ පිටු