Click here to Skip to main content
11,429,777 members (73,462 online)
Click here to Skip to main content
Add your own
alternative version

Date-Time Conversion Utility

, 21 Sep 2001
A simple app that converts to and between time_t, DATE, and regular date string expressions
dtconverter.zip
res
idr_main.ico
DTConverter.ico
DTConverter.dsp
DTConverter.dsw
DTConverter.exe
dtconvertor.zip
DTConverter.ico
DTConverter.dsp
DTConverter.dsw
DTConverter.exe
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif\r\n"
    "#include ""res\\DTConverter.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON    DISCARDABLE     "res\\DTConverter.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_ABOUTBOX DIALOG DISCARDABLE  0, 0, 217, 55
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About DTConverter"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,20,20
    LTEXT           "DTConverter Version 2.0",IDC_STATIC,40,10,119,8,
                    SS_NOPREFIX
    DEFPUSHBUTTON   "Cool!",IDOK,170,7,40,14,WS_GROUP
    LTEXT           "Developed by Alvaro Mendez && Geert Delmeiren",
                    IDC_STATIC,40,28,153,8
END

IDD_DTCONVERTER DIALOGEX 0, 0, 203, 173
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
    WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "DTConverter"
FONT 8, "MS Sans Serif"
BEGIN
    EDITTEXT        IDC_EDIT_TIME_T,39,19,107,12,ES_AUTOHSCROLL
    PUSHBUTTON      "&Convert",IDC_BUTTON_CONVERT_TIME_T,151,19,36,12
    EDITTEXT        IDC_EDIT_OLE_DATE,39,36,107,12,ES_AUTOHSCROLL
    PUSHBUTTON      "C&onvert",IDC_BUTTON_CONVERT_OLE_DATE,151,36,36,12
    EDITTEXT        IDC_EDIT_STRING,39,54,107,12,ES_AUTOHSCROLL
    PUSHBUTTON      "Co&nvert",IDC_BUTTON_CONVERT_STRING,151,54,36,12
    EDITTEXT        IDC_EDIT_SPAN,39,92,107,12,ES_AUTOHSCROLL
    PUSHBUTTON      "Con&vert",IDC_BUTTON_CONVERT_SPAN,151,92,36,12
    EDITTEXT        IDC_EDIT_TOTALSEC,78,110,68,12,ES_AUTOHSCROLL
    PUSHBUTTON      "Conv&ert",IDC_BUTTON_CONVERT_TOTALSEC,151,110,36,12
    EDITTEXT        IDC_EDIT_D,13,128,27,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT_H,50,128,27,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT_M,87,128,21,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT_S,118,128,21,12,ES_AUTOHSCROLL
    PUSHBUTTON      "Conve&rt",IDC_BUTTON_CONVERT_PARTSSPAN,151,128,36,12
    LTEXT           "time_t:",IDC_STATIC,13,21,22,8
    LTEXT           "DATE:",IDC_STATIC,13,38,22,8
    LTEXT           "String:",IDC_STATIC,13,56,21,8
    LTEXT           "Span:",IDC_STATIC,14,94,18,8
    LTEXT           "d",IDC_STATIC,42,130,8,9
    LTEXT           "h",IDC_STATIC,79,130,8,8
    LTEXT           "m",IDC_STATIC,110,130,8,8
    LTEXT           "s",IDC_STATIC,141,130,8,8
    GROUPBOX        "Time Span",IDC_STATIC,7,80,189,69
    GROUPBOX        "Time",IDC_STATIC,7,7,189,68
    LTEXT           "Total seconds:",IDC_STATIC,14,111,50,10
    PUSHBUTTON      "&Quit",IDOK,110,154,42,14
    PUSHBUTTON      "O&ptions",IDC_BTN_OPTIONS,51,154,42,15
END

IDD_OPTIONS DIALOG DISCARDABLE  0, 0, 259, 153
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Options"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         "&No auto-paste/auto-convert functionality at all",
                    IDC_RD_NOAUTOPASTE,"Button",BS_AUTORADIOBUTTON | 
                    WS_GROUP,14,12,162,11
    CONTROL         "&I want the text to be pasted in the first field I click on",
                    IDC_RD_SPECAUTOPASTE,"Button",BS_AUTORADIOBUTTON,14,27,
                    181,10
    CONTROL         "&Full auto-paste functionality",IDC_RD_FULLAUTOPASTE,
                    "Button",BS_AUTORADIOBUTTON,14,53,119,11
    CONTROL         "and to be &auto-converted too",IDC_CHK_AUTOCONVERT,
                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,35,40,141,9
    CONTROL         "N&o auto-convert",IDC_RD_NOAUTOCONVERT,"Button",
                    BS_AUTORADIOBUTTON | WS_GROUP,35,66,67,9
    CONTROL         "Auto-convert &time_t",IDC_RD_TIMET,"Button",
                    BS_AUTORADIOBUTTON,35,79,77,9
    CONTROL         "Auto-convert &DATE",IDC_RD_DATE,"Button",
                    BS_AUTORADIOBUTTON,35,92,78,9
    CONTROL         "Auto-convert Time &String",IDC_RD_STRING,"Button",
                    BS_AUTORADIOBUTTON,35,105,94,9
    CONTROL         "Auto-convert S&pan",IDC_RD_SPAN,"Button",
                    BS_AUTORADIOBUTTON,35,118,75,9
    CONTROL         "Auto-convert total s&econds",IDC_RD_TOTALSEC,"Button",
                    BS_AUTORADIOBUTTON,35,131,101,9
    DEFPUSHBUTTON   "&Apply",IDOK,212,7,40,14,WS_GROUP
    PUSHBUTTON      "Cancel",IDCANCEL,212,27,40,14
    GROUPBOX        "",IDC_STATIC,7,3,196,143
END


#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 2,0,0,0
 PRODUCTVERSION 2,0,0,0
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "\0"
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "DTConverter Application\0"
            VALUE "FileVersion", "2.0\0"
            VALUE "InternalName", "DTConverter\0"
            VALUE "LegalCopyright", "� Copyright 2001\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "OriginalFilename", "DTConverter.EXE\0"
            VALUE "PrivateBuild", "\0"
            VALUE "ProductName", "DTConverter Application\0"
            VALUE "ProductVersion", "2.0\0"
            VALUE "SpecialBuild", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_ABOUTBOX, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 210
        TOPMARGIN, 7
        BOTTOMMARGIN, 48
    END

    IDD_DTCONVERTER, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 196
        TOPMARGIN, 7
        BOTTOMMARGIN, 164
    END

    IDD_OPTIONS, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 252
        TOPMARGIN, 7
        BOTTOMMARGIN, 146
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_ABOUTBOX            "&About DTConverter..."
    IDS_ERR_INVALID_ENTRY   "   Invalid entry.           "
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#include "res\DTConverter.rc2"  // non-Microsoft Visual C++ edited resources
#include "afxres.rc"         // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Alvaro Mendez
Web Developer
United States United States
I've done extensive work with C++, MFC, COM, and ATL on the Windows side. On the Web side, I've worked with VB, ASP, JavaScript, and COM+. I've also been involved with server-side Java, which includes JSP, Servlets, and EJB, and more recently with ASP.NET/C#.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150428.2 | Last Updated 22 Sep 2001
Article Copyright 1999 by Alvaro Mendez
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid