If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Math to Milliseonds
Hello,
I noticed the datediff function will provide date math to the nearest second, but how can I perform date math to the nearest millisecond? Thanks in advance! Jack |
#2
|
|||
|
|||
Date Math to Milliseonds
You can't get that kind of granularity out of the Date/Time data type in
Access. Use the Currency data type to store the duration in seconds. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jack" wrote in message ... Hello, I noticed the datediff function will provide date math to the nearest second, but how can I perform date math to the nearest millisecond? Thanks in advance! Jack |
#3
|
|||
|
|||
Date Math to Milliseonds
Remember that the fractional part of a date is measured in days, so if
you need to convert those, you'll need to multiply the fractional part by 86,400 (=24*60*60) to get the number of seconds to store into your [Seconds] field. Going the other way (and you'll likely lose precision), you'd divide [Seconds] by 86,400 to get a value that you can store in a Date/Time field. Since you're apparently looking for a function to mimic DateDiff(), and since you'll likely be working with values occupying 2 fields (showing date and seconds), I think you'll want to write a VBA function to do that, and then in Queries call your own function instead of DateDiff(). -- Vincent Johns Please feel free to quote anything I say here. Allen Browne wrote: You can't get that kind of granularity out of the Date/Time data type in Access. Use the Currency data type to store the duration in seconds. Jack wrote: Hello, I noticed the datediff function will provide date math to the nearest second, but how can I perform date math to the nearest millisecond? Thanks in advance! Jack |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
NETWORKDAYS - Multiple Date Selection | Annabelle | General Discussion | 3 | October 4th, 2005 07:04 PM |
Date Range and Average F/X Rate | David | General Discussion | 0 | June 23rd, 2005 02:26 PM |
Revised Date Question | Spectra | Running & Setting Up Queries | 0 | March 18th, 2005 12:19 PM |
Date Math Problem | Dkline | Worksheet Functions | 4 | March 4th, 2005 04:11 PM |
Math with Date Mergefield | StephenW | Mailmerge | 2 | January 5th, 2005 06:11 PM |