How to store "1386/2/29" in a TDate variable

Please discuss general Delphi programming topics here.

How to store "1386/2/29" in a TDate variable

Postby Sezar » April 23rd, 2007, 5:26 pm

Hi
I use jalali date,in this date 2nd month has 31 days,
but (xxxx/2/29,xxxx/2/30;xxxx/2/30) dates are not valid in the gregorian date.
how can I store these dates into TDate variables or Database fields.
I can not write english well,because it's not my native language :oops:
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

Postby Kambiz » April 23rd, 2007, 5:32 pm

The method you have chosen is incorrect. Instead, convert the date to Gregorian and then store it as TDate type.

Look at the following topic for more information:
http://forum.delphiarea.com/viewtopic.php?t=10
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

You are inestimable

Postby Sezar » April 24th, 2007, 2:59 pm

Kambiz wrote:The method you have chosen is incorrect. Instead, convert the date to Gregorian and then store it as TDate type.
Look at the following topic for more information:
http://forum.delphiarea.com/viewtopic.php?t=10


Thanks for your help.
I have another question : Do you have information about type of the Japaneses dates?
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

Postby Johnny_Bit » April 24th, 2007, 7:57 pm

Hmm... As far as I remember there are couple of ways to store Japanese date... There's one that's basically similar to Gregorian, just add 10000 years... hmm... wow, It has been whie since I got time to read about some of that stuff.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Sezar » May 1st, 2007, 10:56 am

Johnny_Bit wrote:Hmm... As far as I remember there are couple of ways to store Japanese date... There's one that's basically similar to Gregorian, just add 10000 years... hmm... wow, It has been whie since I got time to read about some of that stuff.


thanks dear johnny_bit.
can you explain more and write an example.
or send me a link about japanese date conversion.
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

Postby Johnny_Bit » May 1st, 2007, 4:29 pm

Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron