# Update "Last Played Date"

**URL:** https://forums.plex.tv/t/update-last-played-date/406817
**Category:** Metadata & Adding Files
**Tags:** server-mac
**Created:** [May 1, 2019, 5:57pm UTC](https://forums.plex.tv/t/update-last-played-date/406817 "2019-05-01T17:57:29Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![mannyotr](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mannyotr](https://forums.plex.tv/u/mannyotr)
#### Post date: [May 1, 2019, 5:57pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/1 "2019-05-01T17:57:29Z")

</div>

Hello,

I tried searching for an answer to this but did not find one.

I have a need to update the “Last Played Date” of some of my media. Is there a way I can select or search for a number of files (by title works) and update the “Last Played Date” to a specific date?

Even if I have to modify a file, that would work.

---

<div class="post-metadata">

### Author: ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)
#### Post date: [May 1, 2019, 6:15pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/2 "2019-05-01T18:15:37Z")

</div>

You would need to edit the database file directly to do that. Can’t be done in the interface.

---

<div class="post-metadata">

### Author: ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)
#### Post date: [May 1, 2019, 6:25pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/3 "2019-05-01T18:25:54Z")

</div>

if you are not comfortable with editing DB then the only other thing i can think of is to change the date of your computer to whatever you needed then mark something as played.

---

<div class="post-metadata">

### Author: ![mannyotr](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mannyotr](https://forums.plex.tv/u/mannyotr)
#### Post date: [May 1, 2019, 6:28pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/4 "2019-05-01T18:28:38Z")

</div>

I am definitely comfortable editing the database. I am actually an Oracle PL/SQL developer at my day job. So I guess I just need to know how to access the DB.

---

<div class="post-metadata">

### Author: ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)
#### Post date: [May 1, 2019, 6:33pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/5 "2019-05-01T18:33:26Z")

</div>

location of the db file is `~/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db`

it is sqlite3

---

<div class="post-metadata">

### Author: ![mannyotr](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mannyotr](https://forums.plex.tv/u/mannyotr)
#### Post date: [May 1, 2019, 6:45pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/6 "2019-05-01T18:45:40Z")

</div>

Thanks!

---

<div class="post-metadata">

### Author: ![mannyotr](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mannyotr](https://forums.plex.tv/u/mannyotr)
#### Post date: [May 1, 2019, 11:09pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/7 "2019-05-01T23:09:17Z")

</div>

So I am looking at the DB now, but would you happen to know what table contains the “Last Played Date”?

---

<div class="post-metadata">

### Author: ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)
#### Post date: [May 1, 2019, 11:18pm UTC](https://forums.plex.tv/t/update-last-played-date/406817/8 "2019-05-01T23:18:34Z")

</div>

Should be “metadata\_item\_settings”

---

<div class="post-metadata">

### Author: ![mannyotr](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mannyotr](https://forums.plex.tv/u/mannyotr)
#### Post date: [May 2, 2019, 1:45am UTC](https://forums.plex.tv/t/update-last-played-date/406817/9 "2019-05-02T01:45:50Z")

</div>

Ok, the “Last Played Date” (column actually called **last\_viewed\_at** ) is in **metadata\_item\_settings**.

It took me some digging around, but I finally figured out that if I am looking for the “Last Played Date” for a particular TV show, I can use this query:

```auto
> select *
> from metadata_item_settings
> where guid in (
> select guid
> from metadata_item_views
> where grandparent_title = 'Seinfeld' -- show title
> --and parent_index = 3 -- season #
> --and "index" > 16 -- episode #
> )
> ;

```

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [July 31, 2019, 1:45am UTC](https://forums.plex.tv/t/update-last-played-date/406817/10 "2019-07-31T01:45:53Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
