Jump to content

JDS2018

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. JDS2018

    Delete Error With Delphi and Access Table

    This is the code but still same error Query.SQL.Add('Delete From Ledger'); Query.SQL.Add('Where LedgerDate between '''+StartDate+ ''' AND '''+EndDate+'''');
  2. Hi i am using MS Access Database With Delphi RAD Studio 10.1 and i am trying to Delete All the Records Between 2 Days with following SQL StartDate:= ''; EndDate:= ''; StartDate:=FormatDateTime('m/d/yyyy',DStartDate.Date); EndDate:=FormatDateTime('m/d/yyyy',DEndDate.Date); Query.SQL.Add('Delete * From Ledger'); Query.SQL.Add('Where LedgerDate between '''+ StartDate +''' And'''+ EndDate+''); but when i run i am getting error please check the attach image if any one can tell me what is the issue , relay appreciate. thanks
  3. JDS2018

    Almediadev Message Dialog

    Hi could you help me how to create Show message with Almediadev bsSkinMessage1 Component ?
  4. JDS2018

    Date Time Differance

    Hi i have done following code procedure TForm1.btnCalculateClick(Sender: TObject); var span: TTimeSpan; AYear,AMonth,ADay:Word; BYear,BMonth,BDay:Word; AHour,AMinit,ASec,AMSec:Word; BHour,BMinit,BSec,BMSec:Word; begin DecodeDate(DDate.Date,AYear,AMonth,ADay); DecodeTime(DTime.Time, AHour, AMinit, ASec, AMSec); DecodeDate(DDate2.Date,BYear,BMonth,BDay); DecodeTime(DTime2.Time, bHour, BMinit, BSec, BMSec); span := TTimeSpan.Subtract(EncodeDate(AYear,AMonth,ADay)+ EncodeTime(AHour,AMinit,ASec,AMSec), EncodeDate(BYear,BMonth,BDay)+ EncodeTime(BHour,BMinit,BSec, BMSec)); Writeln(Format('%d Day(s) %d Hour(s) %d Minute(s)', [span.Days, span.Hours, span.Minutes])); Readln; ShowMessage(IntToStr(span.Days)); end; But i am getting I/O error 105
  5. JDS2018

    Date Time Differance

    Hi Thanks for the quick Reply as per you code i have done following i have add 4 DateTimePicker, 1 Label As below DDate1.Date = Select Date DTime1.Time = Select Time DDate2.Date = Select Date DTime2.Time = Select Time above that how can i add it to your code ? and show the result in to label and i am sorry i am not profeesionl for Delphi i am just learning things still. If Use Code Like this span := TTimeSpan.Subtract(EncodeDate(DDate1.Dat)+EncodeTime(DTime1.Time), EncodeDate(DDate2.Date)+EncodeTime(DTime2.Time)); i am getting following error while i am complying [dcc32 Error] Unit1.pas(67): E2003 Undeclared identifier: 'DDate1' Can you help me please
  6. JDS2018

    Date Time Differance

    Hi Can you help me on belowStart Date and time : 1/1/2018 3:30:00 PM End Date and time : 2/1/2018 4:35:00 PM I Need to Get Result as belowExample Different Between 2 Days and Time 1 Day 1 Hour 5 Minuts
  7. Hi Can you help to on belowStart Date and time : 1/1/2018 3:30:00 PM End Date and time : 2/1/2018 4:35:00 PM I Need to Get Result as belowExample Answer Should be1 Day 1 Hour 5 Mints
×