---
title: "oracle seconds to hh:mm:ss format"
author: "Intrepid2012"
date: "2013-03-13T02:26:46Z"
tags: []
categories: ["数据库"]
slug: "oracle-seconds-to-hh-mm-ss-format"
draft: false
lastmod: "2013-03-13T02:26:46Z"
id: 1828517
url: "https://intrepid2012.iteye.com/blog/1828517"
---

```sql
SELECT 
    TO_CHAR(TRUNC(x/3600),'FM9900')||':'||
    TO_CHAR(TRUNC(MOD(x,3600)/60),'FM00')||':'||
    TO_CHAR(MOD(x,60),'FM00')FROM DUAL
```