Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9134189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:36:59+00:00 2026-06-17T08:36:59+00:00

Below is a copy and paste from my immediate window in VS2010. Notice that

  • 0

Below is a copy and paste from my immediate window in VS2010. Notice that the string representations of the Now function are the same, but their binary representations are vastly different. Unwrapping the Now function from CDate makes no difference. Why?

?CDate(Now)

1/8/2013 10:06:46 AM

?CDate(Now.ToString)

1/8/2013 10:06:52 AM

?CDate(Now.ToString).ToBinary

634932364230000000

?CDate(Now).ToBinary

-8588439384563815032

?Now.ToBinary

-8588439380551725996

Notice that I am now working with the exact same time on every line. Why do I get the “abberant” numerical result when I use the ToString function?

?Now.ToBinary

-8588439366264255565

?datetime.FromBinary(-8588439366264255565)

1/8/2013 10:37:39 AM

?datetime.FromBinary(-8588439366264255565).ToBinary

-8588439366264255565

?cdate(datetime.FromBinary(-8588439366264255565).ToString ).ToBinary 

634932382590000000

?CDate(datetime.FromBinary(-8588439366264255565)).ToBinary

-8588439366264255565
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:36:59+00:00Added an answer on June 17, 2026 at 8:36 am

    It’s because DateTime.Now has millisecond precision, but when you call ToString, milliseconds are not printed. The two dates are not the same anymore.

    If you print the date with a format which includes milliseconds, you will get the same result:

    Dim testDate = DateTime.Now()
    Console.WriteLine(testDate.ToBinary)
    Dim testDateToString = CDate(testDate.ToString("O"))
    Console.WriteLine(testDateToString.ToBinary)
    

    Output:

    -8588439319484221453
    -8588439319484221453
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have users that require to copy and paste from word (or excel) into
When I copy/paste the lines below into a cmd window it executes without a
I wonder if there is something wrong with the copy constructor function below? class
In our website, some Mac users have troubles when they copy-paste text from PDF
When copy/paste from Word I end up with a lot of unsafe characters. Instead
I have the code below that is supposed to draw lines from the top
I want to cut, paste, copy, and select the text from textcrtl to textcrtl.
I am using javascript function for copy/paste (CRTL+V) in textbox. Local run of the
I would like to avoid the if statement below. Can I somehow copy the
Below is code to an inherited ComboBox. The issue is that the ComboBox is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.