By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,867 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Query format for Existing Time

P: n/a
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

Oct 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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


st********@hotmail.com wrote:
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
Oct 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.