Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 9th, 2006, 07:05 PM
starke1120@hotmail.com
Guest
 
Posts: n/a
Default Query format for Existing Time

I'm running a query to an AS/400 system where the time is in military
time format... for example.. if a transacation was at 12:00:58 (thats
am) so my field shows up as 58 with no zeros or anything, indicated
that the transacation took place at 58 seconds. Is there a way to
format this to regular time or at least to 00:00:58 ?

Thanks,

Dave

  #2  
Old October 9th, 2006, 08:45 PM
starke1120@hotmail.com
Guest
 
Posts: n/a
Default Re: Query format for Existing Time

I figured it out so I thought I would post back... it was kinda of
easy but it took me awhile. Maybe someone else will need to know so
here is what I did...

Pick_Time: Format([TRANSTIME],"00\:00\:00")

TransTime being my field I forced it to be 6 charaters long (2 for hr,
2 for min, and 2 for seconds)

This forces zeros to be filled in where they are blank. To group by
hour I put

Left([Pick_Time]),2) then group by. Pick_time being my new field
formated nice and then left two digits to grab just the HR and then
group by to group everything within the same hr.

Hope this helps someone...

Dave




starke1120@hotmail.com wrote:
Quote:
I'm running a query to an AS/400 system where the time is in military
time format... for example.. if a transacation was at 12:00:58 (thats
am) so my field shows up as 58 with no zeros or anything, indicated
that the transacation took place at 58 seconds. Is there a way to
format this to regular time or at least to 00:00:58 ?
>
Thanks,
>
Dave
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles