[54] Results

Golang : Calculate future date with time.Add() function

golang time-different future-date

Problem :

You need to calculate future dates by number of days. This can be use in calculating expiring dates….... read more

Golang : Parse date string and convert to dd-mm-yyyy format

golang dd-mm-yyyy date-time convert-string-date

A reader enquired on how to use Golang to convert date string such as "28th nov 2016" or "nov….... read more

Golang : Get timezone offset from date or timestamp

golang offset time-zone date-to-string

Problem :

You have a date or time stamp and you want get the time zone offset from the date.

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

golang date-time-stampelapsed time-duration convert


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 : Human readable time elapsed format such as 5 days ago

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


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

Cash Flow : 50 days to pay your credit card debt

cash-flow 50-days credit-cards statement-date due-date

In running a business, the most important keyword is "cash flow". A business without healthy cash flow, is just like….... read more

Golang : Change date format to yyyy-mm-dd

golang date-format long-form-date short-form-date

Problem :

Your Golang program is producing date in long form that look like this :

2015-08-11 17:21:52.776537624 +0800 MYT

.... read more