How to transform a date input format into an output format?

You could also create a function that you call every time you want to convert a timestamp. That way, the problem mentioned in @gezepi’s solution doesn’t happen.

#let timestamp(t) = {
  let txt = str(t)
  let date = datetime(
    year: int(txt.slice(0, count: 4)),
    month: int(txt.slice(4, count: 2)),
    day: int(txt.slice(6, count: 2))
  )
  strong(date.display("[weekday] [month repr:long] [day], [year]"))
}
  
On #timestamp(20241020) something happened.  #timestamp("20220115") also had something happen.