Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 31st, 2004, 03:35 AM
Authorized User
 
Join Date: Jul 2003
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to show 24 Hour Time?

I have a table name db,it's struct is follows:
SYS_DATE DATE
It contains a value "2004-7-31 15:41:48"

Then I want to show it,I use follow statement:
select to_char(sys_date,'YYYY-MM-DD HH:MM:SS') from db

But result is "2004-7-31 03:41:48",not "2004-7-31 15:41:48"
How to make result is "2004-7-31 15:41:48"?

Thanks in advance!

 
Old July 31st, 2004, 04:44 AM
Registered User
 
Join Date: Apr 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to amolkataria
Default

Hi Edward,
 Try using,
   select to_char(sys_date,'YYYY-MM-DD HH24:MM:SS') from db;
 HH24 will show the time in 24 Hour format.


Amol.

Amol N. Kataria





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hour by Hour Matrix Report Ed_Conde BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 August 12th, 2008 02:51 PM
8th BME International 24-hour Programming Contest! challenge24 Visual C++ 1 February 12th, 2008 02:35 PM
using format-time to extract hour pcase XSLT 2 December 18th, 2007 12:57 PM
show date/time in a datagrid. mehmetned C# 2005 0 March 23rd, 2007 08:43 AM
Add Column to Show Time KennethMungwira ADO.NET 1 December 2nd, 2003 12:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.