In the forum, some people asked how to format the date: 2004-08-09 05:02:20 This format: So a word left (right) aligned function. This function is equivalent to the Padleft of String object in .NET And Padright functions
Function Padleft (Value, Length, Scha) DIM Strtext, I Strtext = String (Length, Scha) Strtext = Strtext & Value LeftPAD = Right (Strtext, Length) End Function
Change the bottom to this is the case: Function Padright (Value, Length, Schar) DIM Strtext, I Strtext = String (Length, Schar) StRText = Value & Strtext LeftPad = LEFT (STRTEXT, LENGTH) End Function
Example: Date Displays AA = Year (NOW) & "-" & Padleft (Month (now), 2, "0") & "-" & Padleft (day (now), 2, "0") & "" & Padleft (Hour (now), 2, "0") & ":" & Padleft (Minute (NOW), 2, "0") & ":" & Padleft (Second (NOW), 2, "0")