CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Managed C++ and C++/CLI Discuss Managed C++ and .NET-specific questions related to C++.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old July 20th, 2005, 07:55 AM
    rm_kapadia rm_kapadia is offline
    Junior Member
     
    Join Date: Dec 2004
    Location: India
    Posts: 11
    rm_kapadia is an unknown quantity at this point (<10)
    Smile Date Formating form the Custom String

    Hi.. All
    I m Working on one of Text -correction module ..
    I have some difficulty in conversion of the various form of Date come in to raw-input text to some Standard format(mmmm dd yyyy).

    various possibilty of Date text are:
    input OutPut
    Jan 5th 2005 = January 5, 2005
    Jan 2605 = January 26, 2005
    Jan of 05 = January 2005
    Jan 05 = January 2005
    6th of June = June 6, 2005 or June 6
    6th of June 05= June 6, 2005
    this month 6th = July 6, 2005
    On 6th of this month = June 6, 2005

    or monly number like max-digit(i.e: 06242005) = output Reqired is : mm/dd/yyyy =06/24/2005
    to min-digit (i.e : 625) = = output Reqired is : mm/dd/yyyy =06/2/2005


    Can any one Guide me ... how I can Do...it..
    I m very much confused ?? for the logic....
    can any MFC class help here ? CDateTime , CDateTimeFormatInfo ????

    pls...Help me ... looking for positive reply form all of u !

    thanks in Advance !!

    Rajan Kapadia
    Reply With Quote
      #2    
    Old July 21st, 2005, 06:08 AM
    amgturk amgturk is offline
    Junior Member
     
    Join Date: Jul 2005
    Posts: 15
    amgturk is an unknown quantity at this point (<10)
    Re: Date Formating form the Custom String

    hi
    I am not sure it will help you but you can have a look to MSDN about
    COleDateTime::Format

    maybe you will have an idea...

    also an example exists

    COleDateTime t(1999, 3, 19, 22, 15, 0);

    CString str = t.Format(_T("%A, %B %d, %Y"));
    ASSERT(str == _T("Friday, March 19, 1999"));
    Reply With Quote
      #3    
    Old July 26th, 2005, 12:26 AM
    Qwick1E Qwick1E is offline
    Junior Member
     
    Join Date: Oct 2004
    Posts: 17
    Qwick1E is an unknown quantity at this point (<10)
    Re: Date Formating form the Custom String

    In Manage C++ you use the DateTime function.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 06:54 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009