Hello!
I am not sure if this is new only to me, but to me it was:
I noticed that Windows 11 does not show the weekday when I hover over the date in the taskbar.
In fact it does not do anything when I click the date / time in the taskbar on Windows 11.
As the weekend is pretty important to me, I googled and found the suggestion to change the "short date" format.
I did that in the "administrative language options": I added "TTTT" to the short date. That resulted in the taskbar showing the weekday again in the taskbar.
I am using the following code to update the date time modified in a RC6 sqlite command statement like that:
My change of the short date would cause "Now" to be for example "Monday, 19.02.2024 02:39:93".Code:Dim Cmd As cCommand Set Cmd = CnUser.CreateCommand("UPDATE pages SET pagedatetimemodified=?,pagethumbdirty=? WHERE pageguid=? AND pagebookguid=?") Cmd.SetDate 1, Now Cmd.SetBoolean 2, True Cmd.SetText 3, g_currentPage.Guid Cmd.SetText 4, tBook.Guid Cmd.Execute
The cCommand would accept that for date and VB6's "date" type would, too.
I guess it's my own fault, but while being a beginner at SQLite and not having a clear concept about the data types (and I guess also switching between ADO and other formats), I found myself in a situation where "" or NULL was stored in a SQLite column.
That is why I invented a NoNull function:
And this function would not accept the new format.Code:Public Function NoNull(ByVal uAny As Variant, Optional ByVal uFillString As String, Optional ByVal uTreatDecimalNullAsNothing As Boolean = False) As String On Error GoTo ErrHandler If Not IsNull(uAny) Then NoNull = uAny Else NoNull = "" End If If VBA.Len(NoNull) = 0 Then If VBA.Len(uFillString) > 0 Then NoNull = uFillString End If End If If uTreatDecimalNullAsNothing Then If NoNull = "0" Then NoNull = uFillString End If End If Exit Function ErrHandler: Debug.Print Err.Description Call CriticalLog("#NoNull: " & Err.Description & ", err.number: " & Err.Number & ", Params: '" & "" & "'") On Error GoTo -1 Debug.Assert False End Function
This would throw an error:
Dim d As Date
d = NoNull(r!PageDateTimeModified, "00:00:00")
The function will do this:
"d" however will not accept this as a date and throw "Type Mismatch".Code:If Not IsNull(uAny) Then NoNull = uAny'Function will say that "Mittwoch, 19.02.2025 02:12:43" is not null and will return this as the result of the function
Perhaps more people will have customers making this change on their Windows 11, so perhaps my report is helpful to somebody.
It's quite interesting as it's not simple to get rid of the weekday name.
This function is not able to remove it:
Code:Public Function FormatDateEx(ByVal u As Date) As Date Debug.Print u Dim d As Date d = Format(u, "yyyy-mm-dd HH:nn:ss") FormatDateEx = d End Function




Reply With Quote
