G Galaxiom Super Moderator Staff member Local time Tomorrow, 05:10 Joined Jan 20, 2009 Messages 12,895 Aug 28, 2018 #21 The_Doc_Man said: Does the date/time setting allow you to specify "." as the date separator? Click to expand... The default Short Date format for Germany is dd.MM.yyyy
The_Doc_Man said: Does the date/time setting allow you to specify "." as the date separator? Click to expand... The default Short Date format for Germany is dd.MM.yyyy
G Galaxiom Super Moderator Staff member Local time Tomorrow, 05:10 Joined Jan 20, 2009 Messages 12,895 Aug 28, 2018 #22 Also be aware when working in other regions, that the forward slash in the format string is actually a placeholder for the Regional Date Separator. So in regions with a dot date separator (such as Germany) "dd/mm/yyyy" will be rendered as dd.MM.yyyy This is why for international compatibility, when formatting dates for SQL commands, the format string should be: Code: "dd\/MM\/yyyy" The backslash is the literal escape ensuring that the forward slash is used rather than the regional date separator. BTW My preference is to include the hashes in the string rather than concatenating: Code: "\#dd\/MM\/yyyy\#"
Also be aware when working in other regions, that the forward slash in the format string is actually a placeholder for the Regional Date Separator. So in regions with a dot date separator (such as Germany) "dd/mm/yyyy" will be rendered as dd.MM.yyyy This is why for international compatibility, when formatting dates for SQL commands, the format string should be: Code: "dd\/MM\/yyyy" The backslash is the literal escape ensuring that the forward slash is used rather than the regional date separator. BTW My preference is to include the hashes in the string rather than concatenating: Code: "\#dd\/MM\/yyyy\#"
M Magnus1982 Registered User. Local time Today, 12:10 Joined Apr 29, 2017 Messages 41 Aug 28, 2018 #23 It is working CDate(REPLACE([p1ok],".","/")) It was the solution Thank you very much
The_Doc_Man Immoderate Moderator Staff member Local time Today, 14:10 Joined Feb 28, 2001 Messages 30,200 Aug 28, 2018 #24 Magnus - the reason why it would work in one system but not another MIGHT be a difference in the regional settings for WINDOWS (not an Access setting). Check those settings as a possible reason as to the difference in the two systems.
Magnus - the reason why it would work in one system but not another MIGHT be a difference in the regional settings for WINDOWS (not an Access setting). Check those settings as a possible reason as to the difference in the two systems.