# How to get current date and time?

**URL:** https://discourse.julialang.org/t/how-to-get-current-date-and-time/67221
**Category:** New to Julia
**Tags:** dates, time
**Created:** [August 28, 2021, 2:43pm UTC](https://discourse.julialang.org/t/how-to-get-current-date-and-time/67221 "2021-08-28T14:43:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![extremety1989](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/extremety1989/32/28184_2.png) [@extremety1989](https://discourse.julialang.org/u/extremety1989)
#### Post date: [August 28, 2021, 2:43pm UTC](https://discourse.julialang.org/t/how-to-get-current-date-and-time/67221/1 "2021-08-28T14:43:46Z")

</div>

i tried this

```julia
julia> now()
ERROR: UndefVarError: now not defined
Stacktrace:
 [1] top-level scope
   @ REPL[8]:1

```

---

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [August 28, 2021, 2:45pm UTC](https://discourse.julialang.org/t/how-to-get-current-date-and-time/67221/2 "2021-08-28T14:45:19Z")

</div>

```julia
julia> using Dates

julia> now()
2021-08-28T16:44:57.953

```
