SplitString
| purozongo | May 7, 2008 - 07:31 | ||
|---|---|---|---|
|
hi... i have a little problem whit this command... when i try to execute the following function pruebasplit() i have no answer...(in the command window nothing is printed), but when i do de following... function pruebasplit() i have ... what is the problem??? |
|||


Joined: 2008-03-19
Location: Chile
when i try to execute the following
i have no answer...(in the command window nothing is printed), but when i do de following...
i have ...
Mie
07
May
2008
what is the problem???
Joined: 2008-03-19
Location: Chile
i think it is a lenguage problem... because, when i try whit
string palabra=Secs2Date(DateTime,1)it print
rcoles
07
Mayo
2008
any idea?
Joined: 2007-08-14
Location: United States
What is the result when you type ... print date() ... in your command window? The format of the function date() is system dependent, whereas that for Secs2Date(...) is likely not.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
Joined: 2008-03-19
Location: Chile
when i execute
print date()the result is
Jue, 08 de May de 2008
and... when i execute the original function (whit date()) the result was:
Jue
08
May
2008. (for today)
but the problem was whit.
Mié, 07 de May de 2008
this because my OS is in Spanish, but the idea is that the program can by executed independently the OS lenguage.
Joined: 2007-03-01
Location: United States
What information do you actually want? Do you need every part of the date in a separate string/variable?
If you need this to return the same values regardless of the localized version of the OS or the time/date settings in place on a particular user's computer, I'd recommend using the Secs2Date function and pass -1 as the value of the format parameter. That way you always know the format that will be returned, and you can do what you wish with it.
The one problem I can think of with doing this is that if you need to actually print the name of the day and/or name of the month, I'm not sure how you could write code that would work the same regardless of the OS or date settings. If you know that you only need to support a small and finite number of different languages, you could just use a lookup table that you define in your code. But I don't know how you could reliably support any language.
Joined: 2008-03-19
Location: Chile
Yes,
the aim of the sequence is to create a string to name a folder for store my aquired waves.
i actually do some changes, but the final result is some like this:
thanks for the advices.
this print (for today) 14May2008, and this is independ of the OS lenguage.
And for the Folder name just add,
NewDataFolder $foldername----
German Fernandez.
Physiology Lab.
Faculty of Science.
University of Chile.