What setNumberFormat actually does (and doesn't do)
setNumberFormat() writes a display mask onto the cell — the same pattern string the Format > Number > Custom number format dialog accepts. The stored value in the cell never changes. A cell holding 44000.5 formatted as '$#,##0.00' displays '$44,000.50'; the value Apps Script reads back with getValue() is still 44000.5.
That distinction matters most with dates. Sheets stores dates as serial numbers (days since December 30, 1899). A cell showing '2026-07-03' is actually storing 46210. If your date column shows the pattern but the cell never changes — say, it still shows the raw number or the pattern literally — the cell probably contains a text string, not a date serial. setNumberFormat can't fix that; you need to parse and rewrite the value first.
The pattern syntax follows the same rules as Excel custom formats: '0' is a required digit, '#' is optional, commas trigger thousand-separating, and percent patterns multiply the stored value by 100 before display. So store 0.174 and format '0.0%' to show '17.4%'.