Exporting a time column

  • Thread starter Thread starter michelle
  • Start date Start date
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.
 
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.


.
 
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.


.
 
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.



.


.
 
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.



.


.
 
Back
Top