I am trying to extract a date and time from a website using InetRead. The source for the page I am reading shows the date and time as shown below. I need to somehow extract the correct date and time from this information. Is there a function or calculation that will do this? The source shown here correlates to 15:20 (time) 29.03.17 (date).
<div class="cell game-date" data-time="1490818800000"> <div class="site__time" data-time="1490818800000"> <div class="time"></div> <div class="date"></div> </div> </div>
This is an easy way to get the number of days between today and any future date without having to acount for Hours, Minutes, and Seconds.
$iDaysDiff = _DateDiff('D', _NowCalcDate(), $FutureDate)
If $iDaysDiff < 1 Then Return 0 ;Insure only positive return
MsgBox(0, '', ShowDays("2017/07/31"))
I use it to know how many days till I go on my next vacation.
Maybe one of you can find a use for it.
I searched for this oddity for a while but found no results. If I missed it, my apologies.
I have an app that I am building that will eventually search a SQL database for results within a specified range of time. To collect the range of time required but the user, I have 2 fields I created, one for start and the other for end times. They are formatted "yyyy/MM/dd HH:MM:ss" for entry.
The fields are created with this:
$dpStartDate = GUICtrlCreateDate(_NowCalc(), 112, 88, 146, 24) $dpEndDate = GUICtrlCreateDate(_NowCalc(), 416, 88, 146, 24) I am setting the format of the fields with this code: $DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW $style = "yyyy/MM/dd hh:mm:ss" GUICtrlSendMsg($dpStartDate, $DTM_SETFORMAT_, 0, $style) GUICtrlSendMsg($dpEndDate, $DTM_SETFORMAT_, 0, $style) What I am attempting to do is when the start field is updated, compare it with the end time field. If the end time is less than the start time, make both fields match. When I attempt to do so with the function below, The end time date is copied correctly but the time (hour) is reset to 1, no matter the time entered. Am I going about updating the field incorrectly?
As an example, I set the date in the start field to "2013/08/23 11:47:38", the end time field gets set to "2013/08/23 01:00:00"
Func dpStartDateChange() Local $stDT = GUICtrlRead($dpStartDate), $edDT = GUICtrlRead($dpEndDate) If $edDT < $stDT Then MsgBox(0,"Change Needed","End Time: "&$edDT&@CRLF&"Start Time: "&$stDT) ;Shows correct time GUICtrlSetData($dpEndDate,$stDT) EndIf EndFunc There is no code for SQL in place yet. I am working on some of the GUI logic for now. Let me know if there is enough code here or you need more.