Results 1 to 5 of 5

Thread: Date/Time stamp

  1. #1
    Join Date
    Jul 2004
    Posts
    268

    Unanswered: Date/Time stamp

    Hi All,

    I have a script that adds the date/time stamp to a file in the following format:

    200701120149PM.

    here is the script:

    set dttm=%~t1
    for /F "tokens=1-6 delims=/: " %%i in ("%dttm%") do (

    set date=%%k%%i%%j%%l%%m
    )

    I need to display the time as military. How can I do that?

    Thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    What is that?

    Can't you use T-SQL?

    What's the table definition (DDL) look like?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jul 2004
    Posts
    268
    This is a DOS command that displays the system date/time.
    What table are you refering to?

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Well, since this is a MS SQL Server forum, you might want to ask a question about that, othwerwise, there might be another board that can help you out with DOS
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Dec 2002
    Posts
    1,245
    Definitely the wrong forum for this question. Nevertheless, I think the answer may depend on your regional settings; when I run it, the output is fine (ie, no AM/PM, just a military hour).

    This site has some good stuff on DOS scripts...

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

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