English
Forum

Ungültiges date detect

 

Georg
How can I one ungültiges date intercepting z.B.
in the Program comes then a Error Message,"Ungültiges date or Zeitformat" The I intercepting must.
Can on ungültiges date with of/ one function to check on?
CompileMarkSeparation
declare d!
d! = dt("setDate", "30.02.2013", d!)
print  dt("getDoW", d!)re>
 
02/20/13  
 



Perhaps simply a getDate<>setDate abgleich,

means if getDate something other returns as the with setDate inputted
date then is apparently what verrutscht.
 
02/20/13  
 




Georg
the isses not. i will so much edits produce How the month days has and thereby The Sonnabende day =6 and SonntageTag = 7 differently dye.
 
02/20/13  
 



i'm something confused there in the first Posting of my opinion after a integrally other
trouble described is or I the Context now not kappiere. ^^
 
02/20/13  
 




Georg
sorry I create in a Loop edits of 1 - 31,each for a month
set the each the next date in the Loop and question whom day ex and if 6 or 7 color I the suitable edit. in the february and monaten with only 30 Meet -> crash. therefore wished I Verify, whether the one one gültiges date is.
 
02/20/13  
 




Julian
Schmidt
it reicht thereby not from To Verify whether the date the right stature corresponds to.
You must explizit for each day one month's Verify, whether this into suitable month existing.

goes to that example so. (without Beachtung of leap-year)
CompileMarkSeparation
CLS
Declare maxday$
maxday$="31|28|31|30|31|30|31|31|30|31|30|31"

whileloop 12

    print Str$(&loop)+". Monat hat "+SubStr$(maxday$,&loop,"|")+" Tage"

    If Between(30, 1, Val(SubStr$(maxday$,&loop,"|")))

        print "30. Tag innerhalb des "+Str$(&loop)+". Monat"

    Else

        print "30. Tag NICHT innerhalb des "+Str$(&loop)+". Monat"

    Endif

    print "\n"
    waitinput

EndWhile

end
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
02/20/13  
 



Schade that I my (if too quite kryptische) Formel strain not find,
The ausrechnet velvet leap-year, wievele days one month has.
 
02/20/13  
 




Julian
Schmidt
goes too so:
CompileMarkSeparation
CLS
Declare maxday$,year&
maxday$="31|28|31|30|31|30|31|31|30|31|30|31"
year&=2012

whileloop 12

    print "Der "+Str$(&loop)+". Monat hat "+Str$(Val(SubStr$(maxday$,&loop,"|"))+(((year& mod 4)=0) and (&loop=2)))+" Tage"

    If Between(30, 1, Val(SubStr$(maxday$,&loop,"|"))+(((year& mod 4)=0) and (&loop=2)))

        print "30. Tag innerhalb des "+Str$(&loop)+". Monat"

    Else

        print "30. Tag NICHT innerhalb des "+Str$(&loop)+". Monat"

    Endif

    print "\n"
    waitinput

EndWhile

end
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
02/20/13  
 




Jörg
Sellmeyer
In link with dt("IsLeapYear", D) might the The simplest Possibility his.
there must one only whom 29.2. inquire and with True even another area produce.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
02/21/13  
 




Ragnar
Rehbein
Why not so ?
CompileMarkSeparation
set("errorlevel",-1)
print dt("setDate", "29.02.2013")
print %error
set("errorlevel",0)
WaitInput
/pre>

If %error = 2 then ungültiges date.

Greeting Ragnar
 
02/21/13  
 




Jörg
Sellmeyer
is ne good idea. in the Context, could then too same yet The XProfansche Error Message because of one incorrect Datumsformates abgeschafft go, there it ohnehin sinnvoller is, if the Programmer, The Überprüfung yourself vornimmt.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
02/22/13  
 




Ragnar
Rehbein
i'd this Error from the importance since too sooner as warning class. then bräuchte one whom Errorlevel not change and %error would then even 1.
on the other hand would I presumably then not my idea come. an Anpassung Help diesbezüglich would naturally too necessary.

r.r.
 
02/22/13  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

11.251 Views

Untitledvor 0 min.
H.Brill10/10/22
p.specht12/21/20
Walter12/25/16
rquindt09/19/15
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie