<p>You're probably looking for:</p>

<pre><code>{owner.postDate|date("d-m-Y")}
</code></pre>

<p>See the note about dynamic subfolders on an Assets field inside of Matrix here: <a href="https://craftcms.com/docs/assets-fields#dynamic-subfolder-paths" rel="nofollow">https://craftcms.com/docs/assets-fields#dynamic-subfolder-paths</a></p>

CC BY-SA 3.0
2016-10-28T10:12:48.217Z
That's it! I thought it was something like that, but yesterday was a busy and tiring day, so my brains where quite fried at the end of the day and I couldn't get my mind wrapped around the problem :-). Thanks for the help!!
Jan
CC BY-SA 3.0
2016-10-27T16:13:15.757Z
2016-10-27T16:13:15.757Z
Brad Bell
<p>I'm working on a site that will have lots of content. Our customer now asked to have their images upload into a different subfolder, by date.
I can get it done in a "normal" Assets field, but in a Matrix I get an error: <code>Could not resolve the subpath “{postDate|date("d-m-Y")}”</code>, with <code>postDate</code> being the name of the generated folder.
I did the exact same thing in a "regular" Assets field and that does its job as it should.</p>

<p>Can anyone tell me what I'm doing wrong?</p>

<p>Thanks!</p>

<assets><upload><subfolder>
Uploading to a date subfolder within a Matrix
# Uploading to a date subfolder within a Matrix

(Asked by: username_0 on 2016-10-27)

I'm working on a site that will have lots of content. Our customer now asked to have their images upload into a different subfolder, by date.
I can get it done in a "normal" Assets field, but in a Matrix I get an error: `Could not resolve the subpath “{postDate|date("d-m-Y")}”`, with `postDate` being the name of the generated folder.
I did the exact same thing in a "regular" Assets field and that does its job as it should.

Can anyone tell me what I'm doing wrong?

Thanks!

**Tags:** assets, upload, subfolder


---

## 1 answers

### Answer by username_1 on 2016-10-27. Score: 1 | Accepted answer

You're probably looking for:
{owner.postDate|date("d-m-Y")}

See the note about dynamic subfolders on an Assets field inside of Matrix here: https://craftcms.com/docs/assets-fields#dynamic-subfolder-paths

> **Comments:**
> **username_0**: That's it! I thought it was something like that, but yesterday was a busy and tiring day, so my brains where quite fried at the end of the day and I couldn't get my mind wrapped around the problem :-). Thanks for the help!!  

---

