Server.
I have some handler classes where I need to manipulate dates. I am using DateTime.DateFormat to change.
Question: Is there a possibility that another class is running at the same time and generates errors in dates?
Public Sub SDate_to_NormalDate(sd As String) As String
If sd = "-1" Then Return sd
Dim dtf As String = DateTime.DateFormat
DateTime.DateFormat = "yyyyMMdd"
Dim lng As Long = DateTime.DateParse(sd)
DateTime.DateFormat = dtf
Dim res As String = DateTime.Date(lng)
Return res
End Sub
in this time interval the date in another class that is running can generate an error?
I had a problem with the date, but I couldn't find the reason. I imagine this is it.
Thanks Erel ... I will ask the customer to save the error message screen. If it happens again. Probably the error is not there, because if each thread has an instance of Datetime.