Hi DTos, SubStr worked in Vulcan but not I XSharp can some please advise as to how I can covert this to what I did before also the following: Date := DDMMYYYY to Just Date := YYYYMM or MMYYYY
TempYear := DToS(Today())
cYear := SubStr(TempYear,1,4)
cMon := SubStr(TempYear,5,2)
cDay := SubStr(TempYear,7,2)
TempYear := cDay + "." + cMon + "." + cYear
How do I do the same in #Sharp can someone please tell me how to code this
-
- Posts: 46
- Joined: Mon Mar 04, 2019 4:41 pm
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
How do I do the same in #Sharp can someone please tell me how to code this
Did you reference the XSharp.RT / Runtime?rn@warner-it.com wrote:Hi DTos, SubStr worked in Vulcan but not I XSharp can some please advise as to how I can covert this to what I did before also the following: Date := DDMMYYYY to Just Date := YYYYMM or MMYYYY
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
-
- Posts: 46
- Joined: Mon Mar 04, 2019 4:41 pm
How do I do the same in #Sharp can someone please tell me how to code this
I Just tried it with adding the x# RT no change still errors
What is the command to get the date is it datetime date does not work and DTos does not work Datetime does also nothing.
What is the command to get the date is it datetime date does not work and DTos does not work Datetime does also nothing.
How do I do the same in #Sharp can someone please tell me how to code this
Please tell us what errors you are getting.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
How do I do the same in #Sharp can someone please tell me how to code this
m,
Xide, new x#-runtime app, start.prg
FUNCTION Start( ) AS VOID
VAR TempYear := DToS(Today())
VAR cYear := SubStr(TempYear,1,4)
VAR cMon := SubStr(TempYear,5,2)
VAR cDay := SubStr(TempYear,7,2)
? TempYear := cDay + "." + cMon + "." + cYear
RETURN
Compiles and runs flawless.
@All: Guys,
if you want help it is a question of courtesy to provide readable questions.
You expect "us" to invest our free time, but are to lazy, to type some meaningful sentences? Not to mention the essentials, as What OS, what patch of X#, which tool is used...
Sorry for bluntness, but i feel it is time for this little reminder....
Karl
Xide, new x#-runtime app, start.prg
FUNCTION Start( ) AS VOID
VAR TempYear := DToS(Today())
VAR cYear := SubStr(TempYear,1,4)
VAR cMon := SubStr(TempYear,5,2)
VAR cDay := SubStr(TempYear,7,2)
? TempYear := cDay + "." + cMon + "." + cYear
RETURN
Compiles and runs flawless.
@All: Guys,
if you want help it is a question of courtesy to provide readable questions.
You expect "us" to invest our free time, but are to lazy, to type some meaningful sentences? Not to mention the essentials, as What OS, what patch of X#, which tool is used...
Sorry for bluntness, but i feel it is time for this little reminder....
Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
-
- Posts: 46
- Joined: Mon Mar 04, 2019 4:41 pm
How do I do the same in #Sharp can someone please tell me how to code this
Hi Karl,
I agree with your Reference from your reply I am sorry if I did not give you the specifics as you required it is definitely not laziness that I did not give you all the information. Just a question is there a reference or examples as to how to recode certain things in X#. It is a little frustrating when things that work before do not work now unless certain changes is this documented anywhere we can read or use. It is not my ambition to ask for help if I can solve the problem myself. If you want people like me or others to use X' to develop then it would be useful if we had some insight as what needs to be changed in code for things work as they did before
Regards,
Raymond
I agree with your Reference from your reply I am sorry if I did not give you the specifics as you required it is definitely not laziness that I did not give you all the information. Just a question is there a reference or examples as to how to recode certain things in X#. It is a little frustrating when things that work before do not work now unless certain changes is this documented anywhere we can read or use. It is not my ambition to ask for help if I can solve the problem myself. If you want people like me or others to use X' to develop then it would be useful if we had some insight as what needs to be changed in code for things work as they did before
Regards,
Raymond
How do I do the same in #Sharp can someone please tell me how to code this
Hi Raymond,
no offence meant...
The first station for "learning" is probably the X# helpfile, there's a section explaining how to move from VO to X#. Also it shows, how some of the VO samples are moved. Also read the section re the VoX#-Transporter.
Yes, we could do with a complete "Transformation guide", but that requires manpower...
Re your topic: I still don't see, where you have to recode. IIRC, the only thing that VN didn't have, was the "VAR" shortcut.
So If in VO you had
Local TempYear as String or even
Local TempYear
you should be fine - if not, you'll see compiler errors, which should explain what's wrong.
If they are not clear, post here your code (ideally, as in VN-days " a reproducible sample in max 10 lines" ) and the errors you get. Then we have a lot better start to be of help.
Karl
no offence meant...
The first station for "learning" is probably the X# helpfile, there's a section explaining how to move from VO to X#. Also it shows, how some of the VO samples are moved. Also read the section re the VoX#-Transporter.
Yes, we could do with a complete "Transformation guide", but that requires manpower...
Re your topic: I still don't see, where you have to recode. IIRC, the only thing that VN didn't have, was the "VAR" shortcut.
So If in VO you had
Local TempYear as String or even
Local TempYear
you should be fine - if not, you'll see compiler errors, which should explain what's wrong.
If they are not clear, post here your code (ideally, as in VN-days " a reproducible sample in max 10 lines" ) and the errors you get. Then we have a lot better start to be of help.
Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
-
- Posts: 46
- Joined: Mon Mar 04, 2019 4:41 pm
How do I do the same in #Sharp can someone please tell me how to code this
Hi Karl,
No offence taken I have solved quite a few things myself but some things do not seem to work for example office automation like outlook things that worked before do not work under office 365.
Anyway coming back to what we were discussing here is the code as O have always used it and it does not work here in my repository.
LOCAL TempYear AS STRING
LOCAL cYear, cMon, cDay AS STRING
TempYear := DToS(Today())
cYear := SubStr(TempYear,1,4)
cMon := SubStr(TempYear,5,2)
cDay := SubStr(TempYear,7,2)
TempYear := cDay + "." + cMon + "." + cYear
No offence taken I have solved quite a few things myself but some things do not seem to work for example office automation like outlook things that worked before do not work under office 365.
Anyway coming back to what we were discussing here is the code as O have always used it and it does not work here in my repository.
LOCAL TempYear AS STRING
LOCAL cYear, cMon, cDay AS STRING
TempYear := DToS(Today())
cYear := SubStr(TempYear,1,4)
cMon := SubStr(TempYear,5,2)
cDay := SubStr(TempYear,7,2)
TempYear := cDay + "." + cMon + "." + cYear
How do I do the same in #Sharp can someone please tell me how to code this
Raymond,
that leaves me in the dark.
* "Repository"? WHERE is you code?
* Did you try as in my suggestion?
* what is "does not work"? Compiles not, crashs at runtime, TempYear does not contain 27.04.2019, or what?
That was exactly my complain earlier: Why have i to ask for this things? It is YOUR job to provide the information.
And please, don't mix problems in one thread. makes it really messy. Finally, while i'm in soap box mode, PLS provide meaningful text in the "Topic" - noone has a chance to find your problem and a possible solution later on with this.
Suggestion:
[2.0.0.1 FOX; XIDE 1.17; W8.1/64 german; .Net 4.8 ] Substring produces compiler error #123456"
Later on you might hopefully edit this to
[2.0.0.1 FOX; XIDE 1.17; W8.1/64 german; .Net 4.8 ] Substring produces compiler error #123456" // SOLVED
@Robert: any chance to add the meta info in the personal data, so it get's automatically added? Would help...
Karl
that leaves me in the dark.
* "Repository"? WHERE is you code?
* Did you try as in my suggestion?
* what is "does not work"? Compiles not, crashs at runtime, TempYear does not contain 27.04.2019, or what?
That was exactly my complain earlier: Why have i to ask for this things? It is YOUR job to provide the information.
And please, don't mix problems in one thread. makes it really messy. Finally, while i'm in soap box mode, PLS provide meaningful text in the "Topic" - noone has a chance to find your problem and a possible solution later on with this.
Suggestion:
[2.0.0.1 FOX; XIDE 1.17; W8.1/64 german; .Net 4.8 ] Substring produces compiler error #123456"
Later on you might hopefully edit this to
[2.0.0.1 FOX; XIDE 1.17; W8.1/64 german; .Net 4.8 ] Substring produces compiler error #123456" // SOLVED
@Robert: any chance to add the meta info in the personal data, so it get's automatically added? Would help...
Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
How do I do the same in #Sharp can someone please tell me how to code this
Raymond, after several posts in this thread already, you still have not told us what error messages you are getting. How can we help if you are not giving any information?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu