DateFormat?
Beatrix Willius
bwillius at gmx.de
Fri Jan 31 06:55:11 CST 2014
Hi guys,
can you refresh my memory how database.DateFormat is supposed to work. I’ve got some very old code
Private Function getDateFormat() As integer
'get the order of the date with d, m and y
dim DateFormat as Integer
'make a date
dim theDate as new Date
theDate.Year = 2017
theDate.Month = 10
theDate.Day = 31
'make a short date of of the date and look up where the parts ended up
dim shortDate as string = theDate.ShortDate
if Left(shortDate, 2) = "17" or Left(shortDate, 4) = "2017" then
DateFormat = 2
ElseIf Left(shortDate, 2) = "31" then
DateFormat = 1
ElseIf Left(shortDate, 2) = "10" then
DateFormat = 0
End if
Return DateFormat
End Function
to get the format for the date. This is used like follows:
ValentinaDB.DateFormat = getDateFormat
I’m using German dates so this makes 31.10.2017. Why does this produce a DateFormat according to ValentinaStudio of MMDDYYYY? The problem is exactly the same with the DateSeparator. ValentinaStudio shows “/“. But I use “.”. In normal usage of Valentina this is not an issue but may cause problems with loading dumps which aren’t recognized.
Mac OS 10.9, language set to english, but using German date and number settings.
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
More information about the Valentina
mailing list