Exporting a time column

M

michelle

I am attempting to export a time in the format "hhmm".
The column is defined as date/time so after I run the query
and export the results it always exports the date as well
as the time. I just need the time in a string format
of "hhmm" not in any date/time format.
 
M

Michelle

That works to display the time in the query results but
when I export those results it exports the entire
date/time not just the "hhmm" as I need.


-----Original Message-----
Try this:

Format([YourDateField],"hhnn")

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



michelle said:
I am attempting to export a time in the format "hhmm".
The column is defined as date/time so after I run the query
and export the results it always exports the date as well
as the time. I just need the time in a string format
of "hhmm" not in any date/time format.


.
 
L

Lynn Trapp

How about converting it to a string first:

CStr(Format([YourDateField],"hhnn"))

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



Michelle said:
That works to display the time in the query results but
when I export those results it exports the entire
date/time not just the "hhmm" as I need.


-----Original Message-----
Try this:

Format([YourDateField],"hhnn")

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



michelle said:
I am attempting to export a time in the format "hhmm".
The column is defined as date/time so after I run the query
and export the results it always exports the date as well
as the time. I just need the time in a string format
of "hhmm" not in any date/time format.


.
 
M

Michelle

Perfect, thank you.

-----Original Message-----
How about converting it to a string first:

CStr(Format([YourDateField],"hhnn"))

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



Michelle said:
That works to display the time in the query results but
when I export those results it exports the entire
date/time not just the "hhmm" as I need.


-----Original Message-----
Try this:

Format([YourDateField],"hhnn")

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



I am attempting to export a time in the format "hhmm".
The column is defined as date/time so after I run the query
and export the results it always exports the date as well
as the time. I just need the time in a string format
of "hhmm" not in any date/time format.



.


.
 
L

Lynn Trapp

You're welcome

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



Michelle said:
Perfect, thank you.

-----Original Message-----
How about converting it to a string first:

CStr(Format([YourDateField],"hhnn"))

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



Michelle said:
That works to display the time in the query results but
when I export those results it exports the entire
date/time not just the "hhmm" as I need.



-----Original Message-----
Try this:

Format([YourDateField],"hhnn")

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm



I am attempting to export a time in the format "hhmm".
The column is defined as date/time so after I run the
query
and export the results it always exports the date as
well
as the time. I just need the time in a string format
of "hhmm" not in any date/time format.



.


.
 

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