Convert Standard Date to Number of 100-Nanosecond Intervals Since Jan 1, 1601

TheAssetMgr

Board Regular
Joined
Nov 8, 2011
Messages
63
I need a formula to change a standard date (ex: 6/1/2019) to the format Active Directory can use.

The problem is that AD stores date values as the number of 100-nanosecond intervals that have elapsed since the zero hour of Jan 1, 1601. I've found several places that tell me to use this formula to convert TO a standard date format but I can't find anything for the reverse: =IF(C2>0,C2/(8.64*10^11)-109205,"")

Can anyone tell me how I can convert a value of 6/1/2019 in cell A1 to the number of 100-nansecond intervals since 1/1/1601?

Thanks!


 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
If you first formula works then this should:

=8.64*10^11*(A1+109205)
 
Upvote 0
If you first formula works then this should:

=8.64*10^11*(A1+109205)

Thanks for the quick response! This almost works perfectly - hopefully it can be easily tweaked.

When I converted 6/1/2019 I received the following value:
132038208000000000

<tbody>
</tbody>

<tbody>
</tbody>

When that value was imported into AD the result was 5/30/19. Any thoughts on what to change to add the additional two days?

Thanks
 
Upvote 0
Actually, your formula may be working just fine. I went to https://www.epochconverter.com/ldap and dropped in the long format value and the website said it was for 6/1/19. It said though that it was in GMT and I'm on the east coast of the US. That still doesn't explain why there was a two day difference. I could understand where a time zone issue would cause a one-day difference, but not a two-day.

Not sure if that helps you at all.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top