如何修改Oracle SQL Developer SQL历史记录的时间戳显示格式?
Fixing Numeric Timestamp Format in Oracle SQL Developer 4.0.3.16 SQL History
Hey there! Let's get that SQL History timestamp looking readable instead of that long numeric string. First, that number (1525278069600) is a millisecond-precision Unix timestamp—it translates to roughly 05/02/2018 11:53:09, matching your desired format.
Since you're on the older 4.0.3.16 version, here are two approaches to fix this:
Option 1: Check Built-in Preferences (Quickest if Available)
Some older versions still have a UI setting for this, let's check first:
- Open SQL Developer and go to
Tools→Preferences - Expand the
Databasecategory and selectSQL History - Look for a field labeled
Timestamp Format(it might be near the bottom of the panel) - Enter your desired format string, like
MM/dd/yyyy HH:mm:ss - Click
ApplythenOK, and refresh the SQL History panel to see the change
Option 2: Manually Edit the Configuration File (If UI Setting Doesn't Exist)
If the above option isn't available in your version, you'll need to tweak the config file directly:
- Close SQL Developer completely—changes won't take effect if it's running.
- Locate the system configuration directory for your version:
- Windows:
C:\Users\<YourUsername>\AppData\Roaming\SQL Developer\system4.0.3.16.84\o.sqldeveloper\ - macOS:
~/Library/Application Support/SQL Developer/system4.0.3.16.84/o.sqldeveloper/ - Linux:
~/.sqldeveloper/system4.0.3.16.84/o.sqldeveloper/
- Windows:
- Open the
ide.propertiesfile in a text editor. - Look for a line starting with
sqldev.sqlhistory.timestamp.format. If it doesn't exist, add this line:sqldev.sqlhistory.timestamp.format=MM/dd/yyyy HH:mm:ss - Save the file and restart SQL Developer. Your SQL History timestamps should now display in the friendly format you want!
Format String Notes
- Use
MMfor 2-digit months,ddfor 2-digit days,yyyyfor 4-digit years HHis 24-hour time; usehhfor 12-hour time, plusato add AM/PM (e.g.,MM/dd/yyyy hh:mm:ss a)
内容的提问来源于stack exchange,提问作者telamonides
相关产品推荐
相关产品推荐

