Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
European Dates
#1
How do i print dates in the european format instead of american

I want the day before the month
Reply
#2
Code:
mn$ = LEFT$(DATE$, 2)
dy$ = MID$(DATE$, 4, 2)
yr$ = RIGHT$(DATE$, 4)

PRINT dy$ + "-" + mn$ + "-" + yr$


ahhhhh qb... *shudder*
Reply
#3
Quote:How do i print dates in the european format instead of american.....
You may not know when to print the European or American format, which really depends on the user himself and what he is expecting.

I've seen the following "general purpose" date format on several sites. Everyone seems to understand it. It might be what you need.

YYYY-MM-DD

You can do this as follows:
Code:
d$ = date$
mn$ = left$(d$, 2)
dy$ = mid$(d$, 4, 2)
yr$ = right$(d$, 4)

PRINT yr$ + "-" + mn$ + "-" + dy$
*****
Reply
#4
Quote:
Champions_2002 Wrote:How do i print dates in the european format instead of american.....
You may not know when to print the European or American format, which really depends on the user himself and what he is expecting.

I've seen the following "general purpose" date format on several sites. Everyone seems to understand it. It might be what you need.

YYYY-MM-DD

You can do this as follows:
Code:
d$ = date$
mn$ = left$(d$, 2)
dy$ = mid$(d$, 4, 2)
yr$ = right$(d$, 4)

PRINT yr$ + "-" + mn$ + "-" + dy$
*****
Apparently, the metric standard date format thing, is either: yy-mm-dd, dd-mm-yy or with 4 digit years, yyyy-mm-dd, dd-mm-yyyy

Makes sense really, arranged by size. Like.. oh.. everything else?
Reply
#5
According to my Spanish teacher (>_<) it's dd-mm-yyyy because that's how you say it out loud.

Spanish "23-11-2005 The 23rd of November, 2005"
English "11-23-2005 November 23rd, 2005 or 23rd of November, 2005"

etc etc


According to my Spanish teacher.. =p
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#6
European dates make more sense, like Z!re says, they go up in size.
Reply
#7
how is 30-12-2005 arranged by size
Reply
#8
Quote:how is 30-12-2005 arranged by size

Because days are smaller than months and months are smaller than years.
hat were we arguing about again?
Reply
#9
I suppose this is getting rather off topic, but I personally think that using a string representation for the month is more sensible than using numbers for all fields. For example: 02-Jan-2006. This is unambiguous, whereas 01-02-2005 and 02-01-2005 could both refer to this date or to 01-Feb-2006. Another advantage is that the order of the fields becomes unimportant, given that 4-digit years are required; therefore, the date could be written as 02 Jan 2006, Jan 02 2006, 2006 Jan 02, etc. without sacrificing the unambiguity.
Reply
#10
Quote:I suppose this is getting rather off topic, but I personally think that using a string representation for the month is more sensible than using numbers for all fields. For example: 02-Jan-2006. This is unambiguous, whereas 01-02-2005 and 02-01-2005 could both refer to this date or to 01-Feb-2006. Another advantage is that the order of the fields becomes unimportant, given that 4-digit years are required; therefore, the date could be written as 02 Jan 2006, Jan 02 2006, 2006 Jan 02, etc. without sacrificing the unambiguity.
Your right about using the format 02-Jan-2002. It's nice and explicit. I used this format for years, until I went to work for international companies.

The only problem is that the English abbreviation for the months is not universal. Example: a Spanish-speaking person expects to see "ene" instead of "Jan", and "ago" instead of "Aug". Notice that months are not capitalized in Spanish. There are lots of differences in other languages.

The English abbreviation for months are universally recognized but not always accepted. If a report is going to upper management, you want the date to contain the correct abbreviation for the month in the company's language. The same is even much stricter if you are printing checks on the computer. If the date of the check is not in an approved format and spelling, the bank will not honor the check.

So, in order not to go nuts with this issue, the best format is the ISO 8601 standard format of YYYY-MM-DD.
*****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)