Unknown delimiter for StrSplit



The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Mar 6, 2018
Company:

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?

   Quote selected text in answer   Name
#2
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Mar 6, 2018
Company:

I found this way;

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

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

Quote selected text in answer   Name
#3
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jun 10, 2016
Company:

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

Quote selected text in answer   Name
#4
People who like this:0Yes/0No
Administrator
Rating: 22
Joined: Dec 4, 2017
Company:

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

1C Company support team
Quote selected text in answer   Name
Subscribe
Users browsing this topic (guests: 0, registered: 1, hidden: 0)