Queries returning different formats

Y

youkr

Hello,
I have cut and paste the same expression from a query to another, however
when i do this it changes the format of the information returned.

In the inital query it returns (Hours:Minutes) perfectly, expression is
"LOS (Hours:Mins)":
(EDMain!EDDischargeDate+EDMain!EDDischargeTime)-(EDMain!EDPresentationDate+EDMain!EDPresentationTime).
When I paste it, it returns a decimal value (which I presume is the way
access formats time), and adds '[]' to the expression i.e.
"LOS (Hours:Mins)":
([EDMain]![EDDischargeDate]+[EDMain]![EDDischargeTime])-([EDMain]![EDPresentationDate]+[EDMain]![EDPresentationTime]).
I have tried removing the '[]' however they automatically return. Any ideas
how I get the expression to work in the same way that it does in the first
query?

Thanks,
 
Y

youkr

I cant work out how to remove my post - but I have sorted the issue - sorry
for wasting everyone time.
 
G

Gina Whipp

youkr,

You can't remove your post... posting that you found a solution let's us
know to move along... posting the solution is even better as it is bound to
help someone else!

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I cant work out how to remove my post - but I have sorted the issue - sorry
for wasting everyone time.
 
Y

youkr

Of course...
I changed the format of the return to be 'short date' - this made it the
same as my other query.

is there a way to format it h:n:s? When I tried to format it this way it
just returned 'H:n:s' in every record!

Gina Whipp said:
youkr,

You can't remove your post... posting that you found a solution let's us
know to move along... posting the solution is even better as it is bound to
help someone else!

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I cant work out how to remove my post - but I have sorted the issue - sorry
for wasting everyone time.

youkr said:
Hello,
I have cut and paste the same expression from a query to another, however
when i do this it changes the format of the information returned.

In the inital query it returns (Hours:Minutes) perfectly, expression is
"LOS (Hours:Mins)":
(EDMain!EDDischargeDate+EDMain!EDDischargeTime)-(EDMain!EDPresentationDate+EDMain!EDPresentationTime).
When I paste it, it returns a decimal value (which I presume is the way
access formats time), and adds '[]' to the expression i.e.
"LOS (Hours:Mins)":
([EDMain]![EDDischargeDate]+[EDMain]![EDDischargeTime])-([EDMain]![EDPresentationDate]+[EDMain]![EDPresentationTime]).
I have tried removing the '[]' however they automatically return. Any
ideas
how I get the expression to work in the same way that it does in the first
query?

Thanks,

.
 
G

Gina Whipp

IYoukr,

I think what you are looking for is HH:MM:SS

How exactly are you trying to use this?

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Of course...
I changed the format of the return to be 'short date' - this made it the
same as my other query.

is there a way to format it h:n:s? When I tried to format it this way it
just returned 'H:n:s' in every record!

Gina Whipp said:
youkr,

You can't remove your post... posting that you found a solution let's us
know to move along... posting the solution is even better as it is bound
to
help someone else!

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I cant work out how to remove my post - but I have sorted the issue -
sorry
for wasting everyone time.

youkr said:
Hello,
I have cut and paste the same expression from a query to another,
however
when i do this it changes the format of the information returned.

In the inital query it returns (Hours:Minutes) perfectly, expression is
"LOS (Hours:Mins)":
(EDMain!EDDischargeDate+EDMain!EDDischargeTime)-(EDMain!EDPresentationDate+EDMain!EDPresentationTime).
When I paste it, it returns a decimal value (which I presume is the way
access formats time), and adds '[]' to the expression i.e.
"LOS (Hours:Mins)":
([EDMain]![EDDischargeDate]+[EDMain]![EDDischargeTime])-([EDMain]![EDPresentationDate]+[EDMain]![EDPresentationTime]).
I have tried removing the '[]' however they automatically return. Any
ideas
how I get the expression to work in the same way that it does in the
first
query?

Thanks,

.
 

Ask a Question

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.

Ask a Question

Top