# Update dates in (Metadata\_items) in Plex Sqlite on Windows

**URL:** <https://forums.plex.tv/t/update-dates-in-metadata-items-in-plex-sqlite-on-windows/777123>\
**Category:** Metadata & Adding Files\
**Tags:** server-windows\
**Created:** [February 18, 2022, 11:44pm UTC](https://forums.plex.tv/t/update-dates-in-metadata-items-in-plex-sqlite-on-windows/777123 "2022-02-18T23:44:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe.king.cool](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joe.king.cool/32/292477_2.png) [@joe.king.cool](https://forums.plex.tv/u/joe.king.cool)\
**Post date:** [February 18, 2022, 11:44pm UTC](https://forums.plex.tv/t/update-dates-in-metadata-items-in-plex-sqlite-on-windows/777123/1 "2022-02-18T23:44:11Z")

</div>

hello all 🙂 especially SQLite gurus!

im trying to edit the database with plex sqlite. im having a little trouble with how to write the cmd. in (metadata\_items)

i want it to take the dates from the (originally\_available\_at) to (added\_at) if (originally\_available\_at) is (not null)

then i want to copy the dates from (added\_at) to (originally\_available\_at) if (originally\_available\_at) is ( null)

its crazy i know but it makes the dates all correct. 🙂

“C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” “C:\Users\user\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db” " UPDATE metadata\_items SET originally\_available\_at = added\_at WHERE library\_section\_id = 24;"

---

<div class="post-metadata">

**Author:** ![joe.king.cool](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joe.king.cool/32/292477_2.png) [@joe.king.cool](https://forums.plex.tv/u/joe.king.cool)\
**Post date:** [February 19, 2022, 12:25am UTC](https://forums.plex.tv/t/update-dates-in-metadata-items-in-plex-sqlite-on-windows/777123/2 "2022-02-19T00:25:09Z")

</div>

got it!

“C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” “C:\Users\user\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db” " UPDATE metadata\_items SET added\_at = originally\_available\_at WHERE library\_section\_id = 24 AND originally\_available\_at NOT NULL;"

---

<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:** [May 20, 2022, 12:25am UTC](https://forums.plex.tv/t/update-dates-in-metadata-items-in-plex-sqlite-on-windows/777123/3 "2022-05-20T00:25:46Z")

</div>

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