<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>convert time string to time golang on A Place We Can Learn.</title>
    <link>https://blog.cryppy.id/tags/convert-time-string-to-time-golang/</link>
    <description>Recent content in convert time string to time golang on A Place We Can Learn.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 18 Nov 2022 15:27:24 +0700</lastBuildDate><atom:link href="https://blog.cryppy.id/tags/convert-time-string-to-time-golang/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Golang - Parse String Time to Time</title>
      <link>https://blog.cryppy.id/article/parse-string-time-to-time/</link>
      <pubDate>Fri, 18 Nov 2022 15:27:24 +0700</pubDate>
      
      <guid>https://blog.cryppy.id/article/parse-string-time-to-time/</guid>
      <description>Langsung to the point aja, ketika menemukan format tanggal dalam bentuk string dan ingin mengolahnya tentunya kita perlu parsing tanggal tersebut agar menjadi bentuk time.Time di golang.
func parsingTimeStringToTime(date string) (time.Time, error) { if date == &amp;#34;&amp;#34; { return time.Time{}, errors.New(&amp;#34;invalid date&amp;#34;) } // fit the layout // see here default layout from go time.Time: https://pkg.go.dev/time#Constants // i.e date = &amp;#34;2023-01-25 15:04:05&amp;#34; layout := &amp;#34;2006-01-02 15:04:05&amp;#34; convDateStr, err := time.Parse(layout, date) if err !</description>
    </item>
    
  </channel>
</rss>
