[42] Results

Golang : Calculate time different

golang time-different

Problem :

You are looking to calculate the days between two dates. How to do that in Golang?

Solution :

.... read more

Golang : Date and Time formatting

golang date time timestamp

Our civilizations won't progress till this stage without proper understanding, parsing and organising our lives base on date and time.….... read more

Golang : How to check if a date is within certain range?

golang date time within-range time-before time-after


You are processing a large number of raw data files with dates as timestamps. However, you are only interested….... read more

Golang : Get current, epoch time and display by year, month and day

golang get-current-time now epoch-time unix-time

Problem :

You need to get current and Epoch(Unix) time and display the time by year, month and day.

Solution….... read more

Golang : Timeout example

golang time-sleep time-out time-after delay

It is important for programs to know when to abort when connecting to external resources. One such example is the….... read more

Golang : Convert seconds to minutes and remainder seconds

golang seconds minutes time


You have an input seconds in integer that you want to convert into minutes and remainder seconds. How to….... read more

Golang : calculate elapsed run time

golang elapsed-run-time

Calculating elapsed time can be useful for profiling or bench marking purpose. In this short tutorial, we will learn how….... read more

Golang : Get current time

golang get-current-time

Problem :

Need to get current time stamp in Go and display in string.

Solution :

Use the time.Local() and….... read more