CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Oct 2001
    Location
    Dublin, Eire
    Posts
    880

    Question System time format (Answer found)

    Hi,

    do you know how I can get the system time format from Windows?

    My problem is that I have the date as a string, under a format I know about. I want to create a csv file to be able to open it in Excel. Excel use the system format to look if a string is a date or not.

    The problem will mainly appear for month/day. Usually, english format will be: "10/22/2002" while some other formats will be "22/10/2002".

    I need to know how to format the string in order to have excel recognise the string as a date, and not as a simple string. This is a window setting as you can change it in the control panel, so there must be some API function to look for it, but I don't know which...

    Any idea?
    Last edited by Elrond; October 22nd, 2002 at 10:55 AM.
    Elrond
    A chess genius is a human being who focuses vast, little-understood mental gifts and labors on an ultimately trivial human enterprise.
    -- George Steiner

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