|
-
July 27th, 1999, 05:26 PM
#1
some help here
i wanna show the day of the week in a label.
like monday, tuesday, and so on
for each time i load the game it shows the day of the week
in the label.
the time,date i know. i looked through my books and cant find nothing
on this weekday thing.
any help would be appreciated. q;o
-
July 27th, 1999, 08:35 PM
#2
Re: some help here
Weekday(dateval, Firstdayofweek) fn returns an integer for the day specified by dateval taking the value Firstdayofweek as base. By default system settings are taken
Associate this value to a string with "select Case" statement.
Ravi Kiran
"We cannot solve problems with the same thinking we used when we created them." - Einstein
-
July 28th, 1999, 02:55 AM
#3
Re: some help here
>Associate this value to a string with "select Case" statement.
I wouldn't suggest doing that unless you know that your code is only going to be run in one country - take a look at the code in http://www.codeguru.com/vb/articles/1716.shtml to see how to get the 'proper' month/day names from windows (in the current language) using the API (you can still use the WeekDay / other functions though)
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb
-
July 28th, 1999, 03:21 AM
#4
Re: some help here
Good link. and that was a good work too.
Being in Japan and developing s/w in English, i know how important internationalisation is!.
That's why in that example i just left it at based on "select case" logic.
In my case i have my own code that does these.
Incidentally, Japanese "year" is totally different and is based on "Emperor" of Japan.
AFAIK, Windows doesn't provide a way to calculate it too.
"We cannot solve problems with the same thinking we used when we created them." - Einstein
-
July 28th, 1999, 03:47 AM
#5
Re: some help here
Hi Ravi
How does handling the 'Emporer' year and Y2K affect development ? Just wondering - sure sounds like a lot of work !
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb
-
July 29th, 1999, 01:54 AM
#6
Re: some help here
Hi Chris,
I think, For those Jap. programs with 2year dates
and use Christian calender, it probably is same as else where.
For this emperor case, they usually have one or 2 chars before the number to tell which 'Era' it is and then the year num and the year symbol. The month and date are same as Christian calender.
Actually these date formats are often used and by most people too. So, the problem of "roll-over" of years is actually not new to Japanese:-) With every emperor change it probably rolls over.
So, as a permanent solution, most people might have stored their dates in 4 year format right from the beginning itself, and at display time they convert the date to as required (like my program does - i store the date in date-time field )
There is a std. procedure in converting Christian dates to Jap.Era dates. I didn't bother to understand. I took it from my Jap. collegue, (in C, and converted to VB)
---
I was wrong in my prev. post. Windows does provide this convertion. EnumCalenderInfo
But i never used it!!
--
I included a bit map to show these tho dates:

Ravi Kiran
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|