Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Name: dtech10 Date: July 7, 2009 at 02:28:13 Pacific
Reply:
Hi Is this homework. It depends on what format you enter the time.
ie 12:34pm 12.34am ect.
0
Response Number 2
Name: brockey01 Date: July 7, 2009 at 03:51:29 Pacific
Reply:
no its not homework. i would like it in
such as 1:00 pm = 1300 etc.
i dont really understand your Question tho.
thanks
0
Response Number 3
Name: Razor2.3 Date: July 7, 2009 at 05:55:46 Pacific
Reply:
I suggest you use a language with date logic. Like VBScript.
WScript.Echo FormatDateTime(Now, 4)
0
Response Number 4
Name: dtech10 Date: July 7, 2009 at 12:54:43 Pacific
Reply:
Hi Brockey
Hi
Try this, What I meant by the formats is a user could enter 01:30am 01:30 am 1:30am 1:30 am Below it'nt perfect but it caters for the above formats I've used XTime because it's not good to reset the system variable %Date%
@echo off SetLocal EnableDelayedExpansion set /p XTime=Enter local time: for /f "tokens=1-2 delims=:" %%a in ("%XTime%") do ( set Hr=%%a set Min=%%b set Suffix=!Min:~-2! set Min=!Min:~,2! if "!Hr:~0,1!"=="0" (set Hr=!Hr:~1,1!) if "!Hr!"=="12" (if "!Suffix!"=="am" (set Hr=0)) if "!Suffix!"=="pm" (if !Hr! LSS 12 (set /a Hr+=12)) if !Hr! LSS 10 (set Hr=0!Hr!) echo !Hr!:!Min! )
0
Response Number 5
Name: brockey01 Date: July 7, 2009 at 16:06:46 Pacific
Summary: There are API to do this for you. You need to use the GetTimeZoneInformation API. This return all information in a structure. Private Declare Function GetTimeZoneInformation Lib "kernel32" (lpTimeZo...
Summary: hey. ok heres the deal: i am building a program that calculates some pretty lengthy calculations. i have that part down alright, but i would like to, at the users convinience, convert several editbox...
Summary: I would like a vb script to save the time into time.ini when you start it. I'm going to use this to log the time my computer is used. Thanks. ...