# FINALLY SOLVED: Acquire the "Day of the Week" of "%\_file\_mod\_datetime%" AND "%\_file\_create\_datetime%" using their respective Epoch-Unix values (i.e., "%\_file\_mod\_datetime\_raw%" and "%\_file\_create\_datetime\_raw%") (2024-2025) | Great for Columns Sorting

**URL:** https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276
**Category:** Support
**Created:** [May 15, 2026, 5:45am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276 "2026-05-15T05:45:59Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![wneclass2018](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/cdc98d/32.png) [@wneclass2018](https://community.mp3tag.de/u/wneclass2018)
#### Post date: [May 15, 2026, 5:45am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276/1 "2026-05-15T05:45:59Z")

</div>

**Day of the Week** String for " **%\_file\_mod\_datetime%**":

> $replace($mod($div($add(%\_file\_mod\_datetime\_raw%,$mul($ifgreater(86400,%\_file\_mod\_datetime\_raw%,'+1','0'),'+63113904000'),$mul($regexp($regexp($regexp($regexp(%\__file\_mod\_datetime%,'^.\*(?\<![\d])(\d{1,2}):(\d{1,2}:\d{1,2})[\W\_]\*(?=(?:[AP]M)?$)',$1,1),'(?\<![\d])(0?[1-9]|1[0-1])(?![\d])PM',$add($regexp(%\_file\_mod\_datetime%,'^.\*(?\<![\d])(0?[1-9]|1[0-1]):(\d{1,2}:\d{1,2})(?![\d]).\*$',$1),12),1),'^._\*(?\<![\d])(?:12)AM$',00,1),'[^0-9\n]+',),'-3600')),86400),7),'0','Thursday','1','Friday','2','Saturday','3','Sunday','4','Monday','5','Tuesday','6','Wednesday')

**Day of the Week** String for " **%\_file\_create\_datetime%**":

> $replace($mod($div($add(%\_file\_create\_datetime\_raw%,$mul($ifgreater(86400,%\_file\_create\_datetime\_raw%,'+1','0'),'+63113904000'),$mul($regexp($regexp($regexp($regexp(%\__file\_create\_datetime%,'^.\*(?\<![\d])(\d{1,2}):(\d{1,2}:\d{1,2})[\W\_]\*(?=(?:[AP]M)?$)',$1,1),'(?\<![\d])(0?[1-9]|1[0-1])(?![\d])PM',$add($regexp(%\_file\_create\_datetime%,'^.\*(?\<![\d])(0?[1-9]|1[0-1]):(\d{1,2}:\d{1,2})(?![\d]).\*$',$1),12),1),'^._\*(?\<![\d])(?:12)AM$',00,1),'[^0-9\n]+',),'-3600')),86400),7),'0','Thursday','1','Friday','2','Saturday','3','Sunday','4','Monday','5','Tuesday','6','Wednesday')

I forgot to post this shortened string back in early 2025.

Note: For some reason, Mp3Tag community page keeps messing up my regexp format, such as remove the asterisks symbol after a dot. Can anyone help?

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 15, 2026, 6:08am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276/2 "2026-05-15T06:08:07Z")

</div>

If your topic involves a format string, please enclose the format string in backticks ```, e.g., ``my format string`` so that spaces and other special characters like backslashes `\` and stars `*` are preserved by the forum software.  
You can also use Ctrl + E to mark the selected text as preformatted or use the corresponding symbol from the format palette.

![Discourse Format as Code](https://community.mp3tag.de/uploads/default/optimized/2X/0/086045906b1a4658e4beaec173b0d19266bec438_2_345x32.png)

---

<div class="post-metadata">

### Author: ![wneclass2018](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/cdc98d/32.png) [@wneclass2018](https://community.mp3tag.de/u/wneclass2018)
#### Post date: [May 16, 2026, 12:21am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276/3 "2026-05-16T00:21:51Z")

</div>

Thank you, sir. Prior to receiving your response, I filled in the "\_" & "\*", manually. Nonetheless, the script is good to go for providing the Day of the Week, which I use for column sorting.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 16, 2026, 6:01am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276/4 "2026-05-16T06:01:22Z")

</div>

> [@wneclass2018](#):
>
> I filled in the "\_" & "\*"

As I see it, some of the expression is now in italic typeface which suggests that some characters are interpreted as formatting tags.

I copied the result and now present it as code - please check if the expression is still correct:

```auto
$replace($mod($div($add(%_file_mod_datetime_raw%,$mul($ifgreater(86400,%_file_mod_datetime_raw%,'+1','0'),'+63113904000'),$mul($regexp($regexp($regexp($regexp(%_file_mod_datetime%,'^.*(?<![\d])(\d{1,2}):(\d{1,2}:\d{1,2})[\W_]*(?=(?:[AP]M)?$)',$1,1),'(?<![\d])(0?[1-9]|1[0-1])(?![\d])PM',$add($regexp(%_file_mod_datetime%,'^.*(?<![\d])(0?[1-9]|1[0-1]):(\d{1,2}:\d{1,2})(?![\d]).*$',$1),12),1),'^.*(?<![\d])(?:12)AM$',00,1),'[^0-9\n]+',),'-3600')),86400),7),'0','Thursday','1','Friday','2','Saturday','3','Sunday','4','Monday','5','Tuesday','6','Wednesday')

```

and the one for day of the week:

```auto
$replace($mod($div($add(%_file_create_datetime_raw%,$mul($ifgreater(86400,%_file_create_datetime_raw%,'+1','0'),'+63113904000'),$mul($regexp($regexp($regexp($regexp(%_file_create_datetime%,'^.*(?<![\d])(\d{1,2}):(\d{1,2}:\d{1,2})[\W_]*(?=(?:[AP]M)?$)',$1,1),'(?<![\d])(0?[1-9]|1[0-1])(?![\d])PM',$add($regexp(%_file_create_datetime%,'^.*(?<![\d])(0?[1-9]|1[0-1]):(\d{1,2}:\d{1,2})(?![\d]).*$',$1),12),1),'^.*(?<![\d])(?:12)AM$',00,1),'[^0-9\n]+',),'-3600')),86400),7),'0','Thursday','1','Friday','2','Saturday','3','Sunday','4','Monday','5','Tuesday','6','Wednesday')

```

---

<div class="post-metadata">

### Author: ![wneclass2018](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/cdc98d/32.png) [@wneclass2018](https://community.mp3tag.de/u/wneclass2018)
#### Post date: [May 16, 2026, 10:10am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276/5 "2026-05-16T10:10:54Z")

</div>

Thanks. And, yes, they are both correct. Moreover, both strings, respectively, are for "Day of the Week" for %\_file\_create\_datetime% and %\_file\_mod\_datetime%.

---

<div class="post-metadata">

### Author: ![wneclass2018](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/cdc98d/32.png) [@wneclass2018](https://community.mp3tag.de/u/wneclass2018)
#### Post date: [May 18, 2026, 2:12am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276/6 "2026-05-18T02:12:00Z")

</div>

I forgot to post an image of the results. Nonetheless, the image below shows the **Day of the Week** (i.e., from either of the two strings provided above), before the pipe, where it directly coincides with the date of **%\_file\_create\_datetime%** or **%\_file\_mod\_datetime%**.

 ![Mp3tag v3.34.1 (64-bit) (Windows OS) (2026-05-07)_ Day of the Week & SYSTEM's Date CREATED (AM⧸PM) & 24-hrs (10-25-2022) Win OS System_ Image 4K (2026-05-17)_(18 hr_39 min_35 secs)](https://community.mp3tag.de/uploads/default/original/3X/8/2/82f8685ac7a29128882b0d252f291329004e81ef.png)

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [June 7, 2026, 7:05am UTC](https://community.mp3tag.de/t/finally-solved-acquire-the-day-of-the-week-of-file-mod-datetime-and-file-create-datetime-using-their-respective-epoch-unix-values-i-e-file-mod-datetime-raw-and-file-create-datetime-raw-2024-2025-great-for-columns-sorting/71276/7 "2026-06-07T07:05:52Z")

</div>

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