Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DecodeDate

Status
Not open for further replies.

DjangMan

Programmer
Jun 1, 2001
1,785
CA
Can someone else confirm if your DecodeDate for June 30, 2008 returns 2008, 6, 30 for the year, month, day parameters? Mine and another machine are returning 2008, 7, 1.

ESBDates has the same problem and doesn't use the SysUtils function...

I'm using BDS2006 (help, about reports: 10.0.2558.35231 Update 2).

 
Code:
procedure TForm1.Button2Click(Sender: TObject);

var Dt : TDateTime;
    Y,M,D : word;

begin
 Dt := IncDay(Now, -2);
 DecodeDate(dt, Y,M,D);
 showmessage(Format('%d %d %d',[Y,M,D]));
end;

this code gives me 2006 6 30 (also on BDS2006 update2)
my timezone = GMT+1

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
PEBKAC??

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Problem Exists Between Keyboard And Chair

:)
 
another incarnation of that is PEBCAM -
Problem Exists Between Chair And Monitor
 
lol, didn't know that one

[thumbsup]

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top