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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display date in military time

Status
Not open for further replies.

KellyK

Programmer
Mar 28, 2002
212
US
I am trying to display a datetime field in military time format using trunc-date in Impromptu. Is there a better way to do this?

For example, if the value is "03/24/05 1:15PM" I would like to display "13:15" only. I have tried trunc-date(Drop Dt Tm, 'HM') and I get the error ORA-01821: date format not recognized. I've used 'M', 'H:M' and other various strings with no luck. I'm using Impromptu 7.1. I'm not sure which format I need to use.

Thanks!

Kelly
 
KellyK,
If you're only concerned with the display, change the format of your column to HH:MM.

If you are concerned with the output to other programs, that's another issue.

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
with Impromptu functions you could do the following :
to_char( Hours( [DATE] ) + ":" + to_char ( minutes([DATE])


with trunc the format string should be HH24 and MI .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top