%Y for year<\/li><\/ul>\n\n\n\netc. Golang, instead of using codes such as above, uses date and time format placeholders that look like date and time only. Go uses standard time, which is:<\/p>\n\n\n\n
Mon Jan 2 15:04:05 MST 2006 (MST is GMT-0700)\nor \n01\/02 03:04:05PM '06 -0700<\/code><\/pre>\n\n\n\nSo if you notice Go uses <\/p>\n\n\n\n
01 for the day of the month, <\/li> 02 for the month <\/li> 03 for hours, <\/li> 04 for minutes <\/li> 05 for second <\/li> and so on <\/li><\/ul>\n\n\n\nBelow placeholder table describes the exact mapping. Go takes a more pragmatic approach where you don’t need to remember or lookup for the traditional formatting codes as in other languages<\/p>\n\n\n\nType<\/strong><\/td>Placeholder<\/strong><\/td><\/tr>Day<\/td> 2<\/strong> or 02<\/strong> or _2<\/strong><\/td><\/tr>Day of Week<\/td> Monday<\/strong> or Mon<\/strong><\/td><\/tr>Month<\/td> 01<\/strong> or 1<\/strong> or Jan<\/strong> or January<\/strong><\/td><\/tr>Year<\/td> 2006<\/strong> or 06<\/strong><\/td><\/tr>Hour<\/td> 03<\/strong> or 3 <\/strong>or 15<\/strong><\/td><\/tr>Minutes<\/td> 04<\/strong> or 4<\/strong><\/td><\/tr>Seconds<\/td> 05<\/strong> or 5<\/strong><\/td><\/tr>Milli Seconds (ms)<\/td> .000 <\/strong>\/\/Trailing zero will be includedor .999 <\/strong> \/\/Trailing zero will be omitted<\/td><\/tr>Micro Seconds (\u03bcs)<\/td> .000000 <\/strong>\/\/Trailing zero will be includedor .999999<\/strong> \/\/Trailing zero will be omitted<\/td><\/tr>Nano Seconds (ns)<\/td> .000000000 <\/strong>\/\/Trailing zero will be includedor .999999999 <\/strong> \/\/Trailing zero will be omitted<\/td><\/tr>am\/pm<\/td> PM<\/strong> or pm<\/strong><\/td><\/tr>Timezone<\/td> MST<\/strong><\/td><\/tr>Timezone offset<\/td> Z0700 <\/strong>or Z070000<\/strong> or Z07<\/strong> or Z07:00<\/strong> or Z07:00:00<\/strong> or -0700<\/strong> or -070000<\/strong> or -07<\/strong> or -07:00<\/strong> or -07:00:00<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\nNow coming back to time.Parse<\/p>\n\n\n\n
time.Parse<\/strong> function takes in two arguments<\/p>\n\n\n\n