DateFormat?

Joseph Morgan joseph at checkos.com
Fri Jan 31 07:43:14 CST 2014


Hi Trixi,


Is there any chance you are using VServer? I ask because if I remember correctly, you need to explicitly tell VServer to use your preferred date format each time you open the connection. Otherwise it will default to something other than expected. 

Joseph

> On Jan 31, 2014, at 6:55 AM, Beatrix Willius <bwillius at gmx.de> wrote:
> 
> 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
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina


More information about the Valentina mailing list