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
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Sun Apr 13, 2003 9:07 am    Post subject: datetime Reply with quote

Hi,

using @datetime(yyyy-mm-dd hh:nn:ss) is never a problem.
The problem comes up when working with specific date values
instead of the current date. Then it seem you have to know
the regional setting for date (mm.dd.yyyy, mm-dd-yyyy. etc).

I think it would be nice to get this through vds.
I know that I can read the separator, but it isn't the problem.

I can use "." and "-" in germany. The problem is to know
whats first (day or month).

Have a nice sunday Very Happy

Bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Apr 13, 2003 9:25 am    Post subject: Reply with quote

fair enough fabian

Serge

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


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Apr 14, 2003 5:52 pm    Post subject: Reply with quote

I think that if the slash (/) separator is being used, the month is supposed
to come first and then the day, if using the dash, the day comes first and
only then the month, as in dd-mm-yyyy and mm/dd/yyyy.

I expect this script to work on any Windows version:

Code:

  %%day   = 14
  %%month = 10
  %%year  = 2000
  if @equal(@datetime(/),/)
    %%date = %%month/%%day/%%year
  else
    %%date = %%day@datetime(/)%%month@datetime(/)%%year
  end
  info @datetime(dddddd,%%date)

Back to top
View user's profile Send private message Send e-mail Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Mon Apr 14, 2003 5:56 pm    Post subject: datetime Reply with quote

Hi Tommy,

nice to hear from you Very Happy
Thanks for that info.

bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Mon Apr 14, 2003 9:43 pm    Post subject: Reply with quote

hi tommy,

sorry mate...no good on my ME running downunder...i get EXCEPTION: INVALID DATE/TIME

Serge

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


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Apr 14, 2003 9:48 pm    Post subject: Reply with quote

Then maybe it does somehow have the inappropriate mm-dd-yyyy format
set in the regional settings.

Maybe this will work:

Code:

  %%day   = 14
  %%month = 10
  %%year  = 2000
  if @equal(@pos(14,@datetime(ddddd,36813)),1)
    rem day is first
    %%date = %%day@datetime(/)%%month@datetime(/)%%year
  else
    rem month is first
    %%date = %%month@datetime(/)%%day@datetime(/)%%year
  end
  info @datetime(dddddd,%%date)
  exit



Last edited by Tommy on Tue Apr 15, 2003 7:19 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Mon Apr 14, 2003 9:55 pm    Post subject: Reply with quote

perfect tommy Smile

Serge

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


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Apr 14, 2003 10:46 pm    Post subject: Reply with quote

Works here in too. Wink
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Tue Apr 15, 2003 6:24 am    Post subject: datetime Reply with quote

cool Laughing
you are my hero Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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
Page 3 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