Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Unknown delimiter for StrSplit

Forum

Search UsersRules
Unknown delimiter for StrSplit
#1
Active user
Points:: 0
Joined:: Mar 6, 2018

Hello!

I have a problem with date to string coversion;

Code
y = year(CurrentDate);
z = String(y);


"z" can be "2,018" or "2 018" or "2.018" according to regional settings...

Every client have different settings, is there any way to solve this?

Profile
#2
Active user
Points:: 0
Joined:: Mar 6, 2018

I found this way;

Code
ch = Left(Right(z,4),1);

with this way i can get 2nd character what ever its.

Profile
#3
Just came
Points:: 0
Joined:: Jun 10, 2016

Try to use this:
y = year(CurrentDate);
z = Format(y, "NG=");

Profile
#4
Interested
Points:: 0
Joined:: Dec 4, 2017

Dear eyup yilmaz,

Sergey provided an appropriate example for you as using the Format() function is a correct way to get date and time in the format you need.

Best regards,
Vladimir Gurov

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.