GDL reading from txt
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2012-01-20 11:07 AM
‎2012-01-20
11:07 AM
In the workaround I use now, I put in the date as separate fields: 2012;01;20 and then convert them independently to strings. But then the zeros in the beginning of a number dissappear so it shows the date as 2012-1-20. I'd like it to be shown as 2012-01-20.
Please help!
I have done scripting in Java, VBscript and PHP. To me GDL seems very odd. It behaves weird, almost buggy. I can't point my finger at it yet, but there's something...
3 REPLIES 3
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2012-01-21 02:38 PM
‎2012-01-21
02:38 PM
Hello,
I think you should determine if the variable is
considered as a number or as a string with
VARTYPE command and convert on the fly.
If you want to convert a string to number then
use SPLIT and if you want to convert a number
to a string then use STR.
Hope this helps (writing this on a sofa with a mobile
phone - so no examples handy).
Regards, Juha
I think you should determine if the variable is
considered as a number or as a string with
VARTYPE command and convert on the fly.
If you want to convert a string to number then
use SPLIT and if you want to convert a number
to a string then use STR.
Hope this helps (writing this on a sofa with a mobile
phone - so no examples handy).
Regards, Juha
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2012-01-21 06:34 PM
‎2012-01-21
06:34 PM
..or You can put #2012-01-20 in the textfile and then GDL reads it as a string.
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2012-01-24 05:32 PM
‎2012-01-24
05:32 PM
Kiitos!
Using the #2012-01-24 method and then removing the first character. Works perfectly. That was simple...
Using the #2012-01-24 method and then removing the first character. Works perfectly. That was simple...