Hey chaps ?
Trying to export a time value to Excel from MSAccess, Excel sees the value and displays it as a decimal ? I want to raw-export to show the time e.g; 13:45
Any help out there ?
Thanks
Chubby..
Printable View
Hey chaps ?
Trying to export a time value to Excel from MSAccess, Excel sees the value and displays it as a decimal ? I want to raw-export to show the time e.g; 13:45
Any help out there ?
Thanks
Chubby..
set the property of the cell to time
VB Code:
Selection.NumberFormat = "hh:mm;@"
Pieter
Thanks for the post :thumb:Quote:
Originally Posted by [Pieter]
This export is for a customer who wants the raw data to compare against and short of VBA-coding the newly created Excel sheet's colum formatting (alot of work for such a small thing), I wont be able to set the format. No amount of formatting seems to make a difference from the Access end either ... :mad:
thanks
Chubby..
You can use the format function
VB Code:
Dim s As String s = Format(your_time, "hh:mm")
Pieter