Author: Arpit Mandliya
- 25 October
Get First Day of Month in Python
The datetime objects defined in the datetime library provide a convenient way to store date and time values. Other libraries like dateutil also provide extended functionalities that can be used with such objects. In this tutorial, we will discuss how to get first day of month in Python. Get First Day of Month in Python […]
- 21 October
Remove Time from datetime in Python
1. Introduction In Python programming, dealing with date and time is a common scenario. Often, there’s a need to manipulate datetime objects, such as extracting only the date part and discarding the time. For instance, consider a datetime object representing 2023-11-24 15:30:00. The goal is to transform this into just the date 2023-11-24, removing the […]
- 05 October
Find Difference Between Two Instant in Java
In this post, we will see how to find difference between two Instant in Java. Ways to find difference between two Instant in Java There are multiple ways to find difference between two Instant in various time units such as Days, Hours, Minutes, Seconds etc. Using Instant’s until() method To find difference between two Instant, […]
- 05 October
Find Difference Between Two LocalDateTime in Java
In this post, we will see how to find difference between two LocalDateTime in Java. Ways to find difference between two LocalDateTime in Java There are multiple ways to find difference between two LocalDateTime in various time units such as Days, Months, Years etc. Using LocalDateTime’s until() method We can use LocalDateTime’s until() method to […]
- 05 October
Find Difference Between Two LocalDate in Java
In this post, we will see how to find difference between two LocalDate in Java. Ways to find difference between two LocalDate in Java There are multiple ways to find difference between two LocalDate in various time units such as Days, Months, Years etc. Using LocalDate’s until() method We can use LocalDate’s until() method to […]
- 05 October
Get Nth Character in String in JavaScript
In this post, we will see how to get Nth Character in String in JavaScript. Using charAt() method To get nth character in String, you can use String’s charAt() method. chatAt() method accepts index as an argument and return the character at the given index. If index is out of bound for string, charAt() method […]
- 05 October
Get Filename from Path in JavaScript
This article explains the various ways to get filename from path in JavaScript. Get Filename From Path in JavaScript Finding a file name from its file path is a simple task. The program needs to find the last delimiter, and get everything that occurs after it. There are multiple ways to get filename from Path […]
- 04 October
Get Every Other Element in List in Python
A list is one of the more versatile data types among the others provided in Python. As we know lists can store multiple items in one single variable, there is often a need to get only a handful of items from a given list. Get Every Other Element in List in Python This tutorial focuses […]
- 03 October
Get Filename from Path in C++
This article explains the various ways to get filename from path using C++ programs. The examples will also describe ways to remove extensions as well if such needs arise. Get Filename From Path in C++ Finding a file name from its file path is a simple task. The program needs to find the last delimiter, […]