D
DEVOURU
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
Duane Hookom said:Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
DEVOURU said:How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns #Error,
but DateDiff("n", . . . . works fine returning the minutes. I want to find
the time worked before lunch, and the time worked after lunch. And I thought
this was going to be easy
-JS
Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
DEVOURU said:It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes. I want
to find the time worked before lunch, and the time worked after lunch. And
I thought this was going to be easy
-JS
Duane Hookom said:Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
DEVOURU said:How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
Douglas J. Steele said:Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") should work fine.
If not, what are you getting instead of the time?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
DEVOURU said:It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes. I
want to find the time worked before lunch, and the time worked after
lunch. And I thought this was going to be easy
-JS
Duane Hookom said:Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
DEVOURU said:Format does not work in the query. What I have tried in my query is:
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn]) returns #Error
Morning: DateDiff("n",[LunchOut],[ClockIn]) . . . . works fine returning
the minutes.
Thankx for the effort on this one.
-JS
Douglas J. Steele said:Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") should work
fine.
If not, what are you getting instead of the time?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
DEVOURU said:It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes. I
want to find the time worked before lunch, and the time worked after
lunch. And I thought this was going to be easy
-JS
Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
Douglas J. Steele said:Are you running the query from inside of Access, or outside of it? If
outside, then you're right, Format won't work. However, if you're running
it from inside of Access, I just tested it, and Format works fine for me.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
DEVOURU said:Format does not work in the query. What I have tried in my query is:
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn]) returns #Error
Morning: DateDiff("n",[LunchOut],[ClockIn]) . . . . works fine returning
the minutes.
Thankx for the effort on this one.
-JS
Douglas J. Steele said:Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") should work
fine.
If not, what are you getting instead of the time?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes. I
want to find the time worked before lunch, and the time worked after
lunch. And I thought this was going to be easy
-JS
Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
Duane Hookom said:Where did you get
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn])
DateDiff() would expect something like
Morning: DateDiff("n",[LunchOut],[ClockIn])
--
Duane Hookom
MS Access MVP
--
Douglas J. Steele said:Are you running the query from inside of Access, or outside of it? If
outside, then you're right, Format won't work. However, if you're running
it from inside of Access, I just tested it, and Format works fine for me.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
DEVOURU said:Format does not work in the query. What I have tried in my query is:
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn]) returns #Error
Morning: DateDiff("n",[LunchOut],[ClockIn]) . . . . works fine
returning the minutes.
Thankx for the effort on this one.
-JS
Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") should work
fine.
If not, what are you getting instead of the time?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes. I
want to find the time worked before lunch, and the time worked after
lunch. And I thought this was going to be easy
-JS
Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
DEVOURU said:Thank you for the replies.
I want to calculate the difference between two short time values from a
table in a query. I can only get minutes, not hours and minutes.
Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") returns
"Undefined function "Format" in expression. I'm puzzled.
-JS
Duane Hookom said:Where did you get
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn])
DateDiff() would expect something like
Morning: DateDiff("n",[LunchOut],[ClockIn])
--
Duane Hookom
MS Access MVP
--
Douglas J. Steele said:Are you running the query from inside of Access, or outside of it? If
outside, then you're right, Format won't work. However, if you're
running it from inside of Access, I just tested it, and Format works
fine for me.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Format does not work in the query. What I have tried in my query is:
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn]) returns #Error
Morning: DateDiff("n",[LunchOut],[ClockIn]) . . . . works fine
returning the minutes.
Thankx for the effort on this one.
-JS
message Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") should work
fine.
If not, what are you getting instead of the time?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes. I
want to find the time worked before lunch, and the time worked after
lunch. And I thought this was going to be easy
-JS
Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
Duane Hookom said:Try:
Format([LaterTime]-[EarlierTime],"hh:nn")
If Format() gives you an error then you might have a missing reference.
--
Duane Hookom
MS Access MVP
DEVOURU said:Thank you for the replies.
I want to calculate the difference between two short time values from a
table in a query. I can only get minutes, not hours and minutes.
Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") returns
"Undefined function "Format" in expression. I'm puzzled.
-JS
Duane Hookom said:Where did you get
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn])
DateDiff() would expect something like
Morning: DateDiff("n",[LunchOut],[ClockIn])
--
Duane Hookom
MS Access MVP
--
Are you running the query from inside of Access, or outside of it? If
outside, then you're right, Format won't work. However, if you're
running it from inside of Access, I just tested it, and Format works
fine for me.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Format does not work in the query. What I have tried in my query is:
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn]) returns #Error
Morning: DateDiff("n",[LunchOut],[ClockIn]) . . . . works fine
returning the minutes.
Thankx for the effort on this one.
-JS
message Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") should work
fine.
If not, what are you getting instead of the time?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes.
I want to find the time worked before lunch, and the time worked
after lunch. And I thought this was going to be easy
-JS
Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
DEVOURU said:Thankx again for the help. I started this database in version MS Access
2003, saved in 2000 compatabilty. I CAN use the Format function without
error and it works. Problem is why not with MS Access 2000, and how to
fix? Thankix again.
-JS
Duane Hookom said:Try:
Format([LaterTime]-[EarlierTime],"hh:nn")
If Format() gives you an error then you might have a missing reference.
--
Duane Hookom
MS Access MVP
DEVOURU said:Thank you for the replies.
I want to calculate the difference between two short time values from a
table in a query. I can only get minutes, not hours and minutes.
Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") returns
"Undefined function "Format" in expression. I'm puzzled.
-JS
Where did you get
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn])
DateDiff() would expect something like
Morning: DateDiff("n",[LunchOut],[ClockIn])
--
Duane Hookom
MS Access MVP
--
message Are you running the query from inside of Access, or outside of it? If
outside, then you're right, Format won't work. However, if you're
running it from inside of Access, I just tested it, and Format works
fine for me.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Format does not work in the query. What I have tried in my query is:
Morning: DateDiff("hh:nn",[LunchOut],[ClockIn]) returns #Error
Morning: DateDiff("n",[LunchOut],[ClockIn]) . . . . works fine
returning the minutes.
Thankx for the effort on this one.
-JS
message Format(DateDiff("n",[LunchOut],[ClockIn])/1440, "hh:nn") should work
fine.
If not, what are you getting instead of the time?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
It doesn't work in a query.
My actual problem is DateDiff("hh:nn",[LunchOut],[ClockIn]) returns
#Error, but DateDiff("n", . . . . works fine returning the minutes.
I want to find the time worked before lunch, and the time worked
after lunch. And I thought this was going to be easy
-JS
Try
Format([YourFieldOrExpression]/1440,"hh:nn")
--
Duane Hookom
MS Access MVP
--
How would ya'll convert minutes to hrs and minutes?
123 minutes is 02:03 (2 hours and 3 minutes).
TIA!,
-JS
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.