Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle passthrough within MS Access - convert from military time

Status
Not open for further replies.

BxWill

MIS
Mar 30, 2009
367
US
Is it posslbe to display the standard date/time instead of the military time in the query results?

If so, any sql code examples?

 
BxWill,

SQL*Plus has a default DATE/TIME display. A method to view that default is:
Code:
SQL> select sysdate from dual;

SYSDATE
---------
12-MAY-09
You can over-ride the default using Oracle's TO_CHAR function, in which you apply richly exotic format masks of your choosing:
Code:
SQL> select to_char(sysdate,'fmDay, Month Ddspth, yyyy "at" hh24:mi:ss') Currently from dual;

CURRENTLY
-----------------------------------------------------
Tuesday, May Twelfth, 2009 at 8:49:30
Let us know if this assists you along your way.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 
To expand on ChrisHunt's comment, what exactly do you mean by "military time"? Having spent 20 years in the US Air Force, I never saw anything designated "military time". There were at least four different formats commonly used, depending on which operational command I was in. I'm sure the Army, Navy, and Marines have their own "military time" formats. And then we go to non-US militaries, who doubtless have their own formats.

The point of all of this is that providing a sample of the format you are receiving and the format that you would like it converted to would make it much faster and easier for us to provide you with an answer. But, as usual, SantaMufasa has provided the tool to do the job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top