[44] Results

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 time.Duration in year, month, week or day

golang date-time-stampelapsed time-duration convert

Problem:

When using time.Until() or time.Since() functions, the time.Duration type have methods such as Hour(), Minutes(), Nanoseconds() and Seconds() to….... read more


Golang : Calculate elapsed years or months since a date

golang elapsed-time date year month

This is additional tutorial to our previous tutorial on how to calculate elasped run time. We will learn….... read more


Golang : Human readable time elapsed format such as 5 days ago

golang date-time-stamp future-past-date ago elapsed human-readable

Problem:

You need to convert a date time stamp such as this 02 March 1992 10:10:50 into a human readable….... read more


Golang : Convert seconds to minutes and remainder seconds

golang seconds minutes time

Problem:

You have an input seconds in integer that you want to convert into minutes and remainder seconds. How to….... 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 time.Format() functions. getcurrenttime.go package main….... 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 : 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


Advertisement