forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Datetime time-value
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 2:16 pm    Post subject: Reply with quote

FreezingFire, over here it works. I think it is a regional thing, just like the decimalseparator... I think X-Tools should use it himself to see if it works. I think he can use the same as me, because Germany is 'our' neighbour... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Sat Apr 12, 2003 2:28 pm    Post subject: datetime Reply with quote

Hi,

thanks for your answers.
This is what I thought - its a regional thing.
This is not so easy, because I have to make
international apps soon.
It's the same with some scripts I found
on vdsworld some years ago. They used
WAIT .1 (or something similar).
This does not work on german OS.

Maybe S.A.D.E could find a way to make it
working international.

Bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 2:33 pm    Post subject: Reply with quote

About that WAIT .1, you should use option decimalsep,. in your scripts. That way it will work like it should...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 12, 2003 2:39 pm    Post subject: Reply with quote

Here's what it looks like just to illustrate the problem I have with the code:


Maybe it is a regional thing but it should be corrected if Fabian is going to
distribute his scripts.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 2:58 pm    Post subject: Reply with quote

Try this:

Code:
%%date = "01-01-2000"

runh "CMD /C date /T >c:\date.txt",wait
list create,9
list loadfile,9,c:\date.txt
%%datesep = @substr(@text(9),@diff(@len(@text(9)),7),@diff(@len(@text(9)),7))
list close,9

%%date = @substr(%%date,1,@pred(@pos(-,%%date)))%%datesep@substr(%%date,@succ(@pos(-,%%date)),999)
%%date = @substr(%%date,1,@pred(@pos(-,%%date)))%%datesep@substr(%%date,@succ(@pos(-,%%date)),999)

info @datetime(dddd,%%date)

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 12, 2003 3:09 pm    Post subject: Reply with quote

That works. Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
LOBO
Valued Contributor
Valued Contributor


Joined: 14 Mar 2002
Posts: 241
Location: Wilmington, Delaware, USA

PostPosted: Sat Apr 12, 2003 4:36 pm    Post subject: Reply with quote

You can also use @datetime(/) to get the regional date seperator and @datetime(:) to get the regional time seperator.

Code:

%D = @datetime(/)
%T = @datetime(:)
info The regional date seperator as set in the control panel is: %D@cr()The regional time seperator as set in the control panel is: %T
exit


You can see using those options you could write a subroutine to take out the seperators without using the command prompt that Skit had in his example.

Regards,
- Mark


Last edited by LOBO on Sat Apr 12, 2003 4:40 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 4:40 pm    Post subject: Reply with quote

I didn't know that, thanks!
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
LOBO
Valued Contributor
Valued Contributor


Joined: 14 Mar 2002
Posts: 241
Location: Wilmington, Delaware, USA

PostPosted: Sat Apr 12, 2003 4:42 pm    Post subject: Reply with quote

You're welcome Very Happy Wow I feel like I actually did something today Exclamation Laughing


- Mark
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 4:44 pm    Post subject: Reply with quote

Yeah... It really was a pain in the neck... Crying or Very sad
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sat Apr 12, 2003 11:29 pm    Post subject: Reply with quote

hi all,

i too have a problem with the hyphen, but that aside, did anybody test the following code on today's date?
Code:
rem       dd-mm-yyyy
%%date = "01-01-2000"
info @datetime(dddd,%%date)

if i use
Code:
%%date = "13-04-2003"
without the hyphen, then it returns MONDAY when it should return SUNDAY

perhaps a clue to this lies in an earlier post http://forum.vdsworld.com/viewtopic.php?t=919&highlight=datetime where a whole number is a day but not necessarily the date as expressed by the code above

the question then is whole numbers count the days from what starting point??!?!??


Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Apr 13, 2003 8:04 am    Post subject: Reply with quote

It works for me... How is the time notated in Australia? DD-MM-YYYY or MM-DD-YYYY ?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Apr 13, 2003 8:15 am    Post subject: Reply with quote

good point skit - we use dd-mm-yyyy here

using mm-dd-yyyy i got SUNDAY which is weird because my computer is set to use dd-mm-yyyy

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Apr 13, 2003 8:22 am    Post subject: Reply with quote

Maybe you installed it like MM-DD-YYYY, and changed it afterwards?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Apr 13, 2003 8:30 am    Post subject: Reply with quote

i don't think that should matter as my current settings should be the active ones...i just checked my settings and they are dd-mm-yyyy

a mystery Confused

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group