Jump to content

Search the Community

Showing results for tags 'date'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






  1. Newbie to _GUICtrlListView_RegisterSortCallBack and can't get it to sort properly on date in format MM/DD/YYYY. Example code below. Q - How do I get the date to sort properly? ;#AutoIt3Wrapper_run_debug_mode=Y #include <GUIConstantsEx.au3> #include <GuiListView.au3> Global $g_id_ListView Example() Exit Func Example() Local $idRow1, $idRow2, $idRow3 GUICreate("ListView Sort Question", 300, 200) $g_id_ListView = GUICtrlCreateListView("Row#|Name|Date", 10, 10, 280, 180) $id_Row1 = GUICtrlCreateListViewItem("#1|Alice|01/15/2022&qu
  2. it recomended to use the builten function _DateDiff hello autoit team i made a simple function to help me get the difference between to date i liked to share it with you the paramatrs of this function is firstdate and lastedate the two params is as the following year/month/day hours:minuts:seconds here is the function #include <date.au3> func _dateBetween($s_firstDate, $s_lastDate = default) if not (StringRegExp($s_firstDate, "((\d{4})\/(\d{2})\/(\d{2})\s(\d{2})\:(\d{2})\:(\d{2}))", 0) = 1) then Return SetError(1, 0, 0) if
  3. Hi All, Please help me on how to fetch date/time of last windows 10 system restore point using autoit? Basically its about querying the last restore point.
  4. Hi everyone, I am bit stumped as to why I am not able to set the time in the Date control #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() GUICreate("My GUI get date", 200, 200, 800, 200) Local $idDate = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20, $DTS_TIMEFORMAT) ; to select a specific default format Local $sStyle = "HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) ; Set time Local $iRet = GUICtrlSetData($idDate, '13:
  5. I've encountered a problem with a single file where I cannot retrieve it's Date-time. So far my code has worked well for over 30 files, but this one is a mystery I cannot debug myself due to insufficient Au3 knowledge. In line 11 "_Date_Time_FileTimeToArray" is called and for this particular file it sets the @error to 10. I don't know what that error code means, but it's not set by the _Date functions themselves I think. Overall, it could be a problem caused by any of the functions below, how can I properly debug this? / Does anybody know a what's causing this? _WinAPI_CreateFil
  6. Here is an other UDF for string handling : Date handling _StringDateConvert: convert a date from one format ("YMD", "MDY" or "DMY") to another. _StringIsDate: checks if a date with a given format is valid String management _StringCount: count of occurrences that appear in a string _StringFormatBytesSize: formatting a dimension expressed in bytes (bytes) in MB, TB, ...) _StringIsEndingWith: check if a string end with some characters _StringIsStartingWith: check if a string start with some characters _StringJoinArray: concatenate elements of an arr
  7. Hey All, I'm trying to set the date using a variable. Basically, I set the date into the input box, then I change the input box, say, I change the year. Then I set what I typed into the input box into the Date Picker. This is a demo code. #include <ButtonConstants.au3> ;Start GUI includes #include <EditConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <GuiDateTimePicker.au3> #Region ### START Koda GUI section ### Form= $Form1 = G
  8. Hi, Ones(some times twice) a month I get an e-mail with zip file, which has price updates from a supplier. I have to upload the file to an FTP to get it processed. When uploading the file, it will get "timestamped" with the time and date at which time the file was uploaded. Normally this is fine, because I mostly upload the file the same day. Sometimes it may take 1 or 2 days before I can upload the file. For historical purpose, I would like to have the file timestamped with the original date. I have tried using: _FTP_Command ( $hFTPSession, "MFCT YYYYMMDDHHMMSS path
  9. So what i need is a function that I pass a starting date into and it counts up to the current date. Example: 2009-05-30 2009-05-31 2009-06-01 ... 2018-06-18 How would I do that? I found the Date.au3 in the includes but I can't find anything close to a time object like I'm used to working with in Java. I just need some $date = setDate(2009-05-30) and from there I could just add a day every time. I need this to be in the very format I stated earlier and from what I can see everytime related to date and time is automatically changed to my german locale. €: I alr
  10. Hello I have a question please How to show Islamic date in Autoit I mean for example Ramadan month And moharam month ... etc I hope my question is clear for you Thanks in advance
  11. I have established how to get tomorrows date however I can't seem to figure out how to format the date into my required format of MM/DD/YYYY. I have this: $today=_DateToDayValue(@YEAR,@MON,@MDAY) Dim $Y, $M, $D $tomorrow=_DayValueToDate($today+1, $Y, $M, $D) The _DateToDayValue seems to have a fixed format. I've also tried a : $vardate = _DateAdd( 'd',1, _NowCalcDate()) with a "StringSplit" and/or StringFormat but the _NowCalcDate seems to also be fixed to a YYYY/MM/DD format. I'm sure I'm missing something simple but am at a loss. Any help would be
  12. So I get: $aMatch[0] Date(1499295600000) this is supposed to be 06 Jul 2017 $aMatch[0] Date(1483574400000) this is supposed to be 05 Jan 2017 does anybody know the formula to calculate the date from the large number? It doesn't seem to be anything to do with DateToDayValue. thanks in advance.
  13. I am taking a Date & Time and splitting them using _DateTimeSplit, so that I can create a filename in the format: YYYYMMDD_HHMMSS.jpg. The only issue is that if the month, or day, is a two-digit number that begins with a zero (so less than 10), then the month, or day, is formatted as a single-digit number. Suggestions on how to accomplish this? Example: 20180101 becomes 2018, 1, 1 20180303 becomes 2018, 3, 3 20180505 becomes 2018, 5, 5 20180606 becomes 2018, 6, 6 20180909 becomes 2018, 9, 9 What I want: 20180101 becomes 2018, 01, 01 20180303 becomes 2018, 03, 03
  14. I've been looking through some different functions(not sure if that's the right word) to get the Date and time and I can't find one that doesn't include "/ " or ":" in what is returned. I'm trying to create a file name with this format "QuickConfig_MMDDYYYY_HHMM" (doesn't matter if 24 or 12hr format) #include <Date.au3> Func _SaveConfig MouseClick('primary',155, 46, 1, 0) ;clicks save as WinWait('Save bluePRINT Configuration As...','', 4) MouseClick('primary',632, 47, 1, 0) ;clicks the file path bar $Documents = @MyDocumentsDir
  15. I have date in the string format as "DD-MM-YYYY". I need to get yesterday's date from it. I tried converting this from _DateTimeFormat but not working. Is there any direct UDF available to get this.?
  16. In some systems the date is displayed in the Taskbar as 10-01-2018 And in some systems it is like, 1/10/2018 And in some it is, 10-Jan-2018 And in different formats. I wrote my code to convert 1/10/2018 to 10-01-2018 Func TodaysDate() $NewDate = _DateTimeFormat(_NowCalcDate(),1) $Array = StringSplit( $NewDate , ',' ) _ArrayDelete($Array, 0) _ArrayDelete($Array, 0) $Array1 = StringSplit($Array[0],' ') RemoveEmptyArrayLines($Array1) ;Will return the present day's date with format dd-mmm-yyyy ;$Date = StringStripWS($Array1[
  17. To get the current time stamp, I got the below code. #include <Date.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #RequireAdmin ; Under Vista the Windows API "SetSystemTime" may be rejected due to system security $td = _Date_Time_GetSystemTime() $td = _Date_Time_SystemTimeToDateTimeStr($td) $td = StringReplace($td, " ", "_") $td = StringReplace($td, ":", "_") MsgBox(0,"",$td) But it is not giving the date or time of the timezone where the system is there. Please suggestt
  18. When I tried the below code, I am getting the date in mm-dd-yyyy format. But I require dd-mm-yyyy format. Can anyone suggest how to do that. Func TodaysDate() return StringReplace(_DateTimeFormat(_NowCalc(), 2), "/", "-") EndFunc Earlier I tried dd-mmm-yyyy format and it is working with below code. Func TodaysDate() $NewDate = _DateTimeFormat(_NowCalcDate(),1) $Array = StringSplit( $NewDate , ',' ) _ArrayDelete($Array, 0) _ArrayDelete($Array, 0) $Array1 = StringSplit($Array[0],' ') RemoveEmptyArrayLines($Array1) $Date
  19. Hi guys, I have some code; which doesn't quite work. $dateStop = "11302015" $tDate = _Date_Time_GetSystemTime() $currentdatestring = _Date_Time_SystemTimeToDateStr($tDate) If $currentdatestring >= $dateStop Then MsgBox(0, "Expired", "Script has expired.") Exit EndIf Basically, I want to essentially put an expiry date on the script. Where in the example above, it is 30th November 2015. Sometimes it works, sometimes it doesn't. I may have the string wrong, I may have the code all wrong.
  20. Test instructions are easy. 1. Run the following code in post #46 2. Click the advanced tab 3. Select a start date and an end date 4. Put a tick in the checkbox where it says 'Include Days Of The Week' 5. Click the Okay button You should get an array with a column of dates in your local format and a second column with day names in your language. It has a current range limit of just under 89 years but this range can appear anywhere between the years 1601 and 9999. The code is untidy and unfinished, but I would still like to know if it works outside the UK. No extra includes ar
  21. Hello guys, i have a problem in this regex because its not groupping right. Look: (\d{1,2}\s?[\055|\056|\057|\134]\s?\d{1,2}(\s?[\055|\056|\057|\134]\s?\d{2,4})?) It checks for day or dayday, month or monthmonth, yearyear or yearyearyear+year. separated with or without space and the characters "\/.-" But, a problem! I tried to regex the date with or without the "separator + year" Eg: 05/05 or 05/05/05, but when i have 05/05/05, regex are separating 05/05 and /05 Iam using group "()" wrong? Need help here Thx adv! ~~EDIT: Script used: (from autoit
  22. I've created a simple script that opens the Snipping Tool; Selects the "Full Screen Snip" option; then closes the program, prompting a save. What I can't figure is how to name the file using the system date and time. Can anyone help? Run(@WindowsDir & '\system32\SnippingTool.exe') AutoItSetOption('MouseCoordMode', 0) Sleep(1) $hWnd= WinWait("Snipping Tool", "ToolBarWindow32", 1) WinActive($hWnd) MouseClick('primary', 84, 48, 1, 0) MouseClick('primary', 84, 140, 1, 0) WinClose("[Class:Microsoft-Windows-Tablet-Snipp
  23. I have another AutoIT script making a Log file Sample of Log file: 2016/08/22 12:44:18 > Process: [RUNNING] [ACTIVE] 2016/08/22 12:48:35 > Process: [WAS NOT RUNNING] 2016/08/22 13:40:00 > Process: [FAILED] 2016/08/22 14:01:10 > Process: [WAS NOT RUNNING] I am looping through the Log file for the word "FAILED" I then want to get all lines that have "FAILED" and get their TIME My Current code to get this far: If FileExists($fileLog) Then $contents = FileRead($fileLog) If @error Then MsgBox(0, 'File Error', $fileLog & ' coul
  24. Hi to all My problem is how can I compare two dates if I have the following code: $date = _NowDate() $dateend = "10/12/2016" if $date > $dateend Then Exit EndIf It does not work well I guess it's because I'm comparing two strings not realy two dates. My idea would break the date into three numbers year, month and day and go comparing data as numbers. is this correct...? Thank's to all
  25. I am assigning the current time stamp to a variable $strtTime and holding the execution for 5 seconds with Sleep and calculating the current time stamp. Ideally, the _DateDiff should give 5 seconds as output as i gave the parameter as s.But it is giving zero 0. Any suggestions....! Global $startTime = _Date_Time_GetLocalTime() $startTime = _Date_Time_SystemTimeToDateTimeStr($startTime) Sleep(5000)     $tCur = _Date_Time_GetLocalTime()     $tCur = _Date_Time_SystemTimeToDateTimeStr($tCur) $iDateCalc = _DateDiff('s', $startTime, $tC
  • Create New...