CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Question Excel date format? How to convert it?

    Hi!

    In one databse, there are dates stored as fixed point numbers (e.g. 38596.0 or 38625.0). Someone told me that this is Excel format. Could it be Excel format, or what format is it? And how can I convert it to common date time which I can read?

    Thanks
    Last edited by boudino; October 13th, 2005 at 06:01 AM.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  2. #2
    Join Date
    Oct 2005
    Location
    India
    Posts
    24

    Talking Re: Excel date format? How to convert it?

    Try this query in SQL Server .Its converting ."select convert(datetime,38625.0,101)".

  3. #3
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Excel date format? How to convert it?

    I have tried "Mark thread as resolved" and nothing has happened. So for others: it works.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  4. #4
    Join Date
    Oct 2005
    Location
    India
    Posts
    24

    Lightbulb Re: Excel date format? How to convert it?

    Hi ,

    The number you have given is the number of days from 1900.That's it.when u give that in the convert function it converts to the present date form.

    take care,
    buy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured