|
-
Sep 27th, 2005, 04:52 AM
#1
Thread Starter
Hyperactive Member
Export Time Value to Excel comes in as decimal?
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..
-
Sep 27th, 2005, 06:53 AM
#2
Lively Member
Re: Export Time Value to Excel comes in as decimal?
set the property of the cell to time
VB Code:
Selection.NumberFormat = "hh:mm;@"
Pieter
-
Sep 27th, 2005, 07:38 AM
#3
Thread Starter
Hyperactive Member
Re: Export Time Value to Excel comes in as decimal?
 Originally Posted by [Pieter]
set the property of the cell to time
VB Code:
Selection.NumberFormat = "hh:mm;@"
Pieter
Thanks for the post
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 ...
thanks
Chubby..
-
Sep 27th, 2005, 07:54 AM
#4
Lively Member
Re: Export Time Value to Excel comes in as decimal?
You can use the format function
VB Code:
Dim s As String
s = Format(your_time, "hh:mm")
Pieter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|