# Inspect/2 output for structs: executable code or structure?

**URL:** <https://forum.elixirforum.com/t/inspect-2-output-for-structs-executable-code-or-structure/64659>\
**Category:** Questions\
**Tags:** structs, struct, inspect\
**Created:** [July 3, 2024, 12:27am UTC](https://forum.elixirforum.com/t/inspect-2-output-for-structs-executable-code-or-structure/64659 "2024-07-03T00:27:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Marcus](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/marcus/32/24640_2.png) [@Marcus](https://forum.elixirforum.com/u/Marcus)\
**Post date:** [July 3, 2024, 5:51am UTC](https://forum.elixirforum.com/t/inspect-2-output-for-structs-executable-code-or-structure/64659/2 "2024-07-03T05:51:30Z")

</div>

I expect executable code as a result of `inspect`. In my projects, I also change it to this effect.  
If I want to see the structure I use:

```elixir
iex> Date.utc_today()
~D[2024-07-03]
iex> Date.utc_today() |> inspect(structs: false)
"%{calendar: Calendar.ISO, month: 7, __struct__ : Date, day: 3, year: 2024}"

```

---

_[View the full topic](https://forum.elixirforum.com/t/inspect-2-output-for-structs-executable-code-or-structure/64659)._
