CONFIG DATE/de

(Difference between revisions)
Jump to: navigation, search
((**COPIED FROM ENGLISH PAGE**) =)
(Remarks)
Line 15: Line 15:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Remarks</span> =
+
= <span class="f_Header">Anmerkungen</span> =
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
{| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
Line 23: Line 23:
  
 
| valign="top" width="100%" style="width: 400px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 400px; border: 1px solid rgb(0, 0, 0);" |  
The Day, month and year order. Use DMY, MDY or YMD.
+
Die Tag-Monat-Jahr-Reihenfolge. Benutzen Sie DMY, MDY oder YMD.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 30: Line 30:
  
 
| valign="top" width="100%" style="width: 400px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 400px; border: 1px solid rgb(0, 0, 0);" |  
The character used to separate the day, month and year.
+
Das Zeichen, das als Trennzeichen zwischen Tag, Monat und Jahr benutzt werden soll.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
Old syntax&nbsp;: &nbsp;/ , - or . (dot).
+
Alte Syntax&nbsp;: &nbsp;/ , - oder . (Punkt).
  
 
&nbsp;
 
&nbsp;
  
Preferred new syntax&nbsp;: MINUS, SLASH or DOT.
+
Bevorzugte neue Syntax&nbsp;: MINUS, SLASH oder DOT.
  
 
&nbsp;
 
&nbsp;
  
Example:
+
Beispiel:
  
 
Config Date = DMY, SEPARATOR=MINUS
 
Config Date = DMY, SEPARATOR=MINUS
Line 50: Line 50:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
The following table shows the common formats of date and the associated statements.
+
Die folgende Tabelle zeigt die gebräuchlichsten Datumsformate und die entsprechenden Befehle.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
Line 141: Line 141:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
When you live in Holland you would use&nbsp;:
+
In Holland würde man folgendes nutzen&nbsp;:
  
 
CONFIG DATE = DMY, separator = MINUS
 
CONFIG DATE = DMY, separator = MINUS
  
This would print 24-04-02 for 24 November 2002.
+
Das würde 24-04-02 für den 24. November 2002 ausgeben.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
When you line in the US, you would use&nbsp;:
+
In den USA würde man folgenden benutzen&nbsp;:
  
 
CONFIG DATE = MDY , separator = SLASH
 
CONFIG DATE = MDY , separator = SLASH
  
This would print 04/24/02 for 24 November 2002.
+
Das würde  04/24/02 für den 24.November 2002 ausgeben.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>

Revision as of 23:44, 19 March 2013

Contents

Funktion

Konfiguriert das Format des Datums-Strings für Eingabe und Ausgabe bei BASCOM Datumsfunktionen

 

 

Syntax

CONFIG DATE = DMY , Separator = char

 

 

Anmerkungen

DMY

Die Tag-Monat-Jahr-Reihenfolge. Benutzen Sie DMY, MDY oder YMD.

Char

Das Zeichen, das als Trennzeichen zwischen Tag, Monat und Jahr benutzt werden soll.

 

Alte Syntax :  / , - oder . (Punkt).

 

Bevorzugte neue Syntax : MINUS, SLASH oder DOT.

 

Beispiel:

Config Date = DMY, SEPARATOR=MINUS

 

Die folgende Tabelle zeigt die gebräuchlichsten Datumsformate und die entsprechenden Befehle.

 

Country

Format

Statement

American

mm/dd/yy

Config Date = MDY, Separator = SLASH

ANSI

yy.mm.dd

Config Date = YMD, Separator = DOT

Britisch/French

dd/mm/yy

Config Date = DMY, Separator = SLASH

German

dd.mm.yy

Config Date = DMY, Separator = DOT

Italian

dd-mm-yy

Config Date = DMY, Separator = MINUS

Japan/Taiwan

yy/mm/dd

Config Date = YMD, Separator = SLASH

USA

mm-dd-yy

Config Date = MDY, Separator = MINUS

 

 

In Holland würde man folgendes nutzen :

CONFIG DATE = DMY, separator = MINUS

Das würde 24-04-02 für den 24. November 2002 ausgeben.

 

In den USA würde man folgenden benutzen :

CONFIG DATE = MDY , separator = SLASH

Das würde 04/24/02 für den 24.November 2002 ausgeben.

 

 

See also

CONFIG CLOCK , DATE TIME functions , DayOfWeek , DayOfYear , SecOfDay , SecElapsed , SysDay , SysSec , SysSecElapsed , Time , Date

 

 

Example


'-----------------------------------------------------------------------------------------
'name : megaclock.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : shows the new TIME$ and DATE$ reserved variables
'micro : Mega103
'suited for demo : yes
'commercial addon needed : no
'-----------------------------------------------------------------------------------------
 
$regfile = "m103def.dat" ' specify the used micro
$crystal = 4000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
'With the 8535 and timer2 or the Mega103 and TIMER0 you can
'easily implement a clock by attaching a 32768 Hz xtal to the timer
'And of course some BASCOM code
 
'This example is written for the STK300 with M103
Enable Interrupts
 
'[configure LCD]
$lcd = &HC000 'address for E and RS
$lcdrs = &H8000 'address for only E
Config Lcd = 20 * 4 'nice display from bg micro
Config Lcdbus = 4 'we run it in bus mode and I hooked up only db4-db7
Config Lcdmode = Bus 'tell about the bus mode
 
'[now init the clock]
Config Date = Mdy , Separator = SLASH ' ANSI-Format
 
Config Clock = Soft 'this is how simple it is
'The above statement will bind in an ISR so you can not use the TIMER anymore!
'For the M103 in this case it means that TIMER0 can not be used by the user anymore
 
'assign the date to the reserved date$
'The format is MM/DD/YY
Date$ = "11/11/00"
 
'assign the time, format in hh:mm:ss military format(24 hours)
'You may not use 1:2:3 !! adding support for this would mean overhead
'But of course you can alter the library routines used
 
Time$ = "02:20:00"
 
'---------------------------------------------------
 
'clear the LCD display
Cls
 
Do
Home 'cursor home
Lcd Date$ ; " " ; Time$ 'show the date and time
Loop
 
'The clock routine does use the following internal variables:
'_day , _month, _year , _sec, _hour, _min
'These are all bytes. You can assign or use them directly
_day = 1
'For the _year variable only the year is stored, not the century
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language