Autor Beitrag
Dhakiyah
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 327
Erhaltene Danke: 5

Windows 7
Delphi XE2
BeitragVerfasst: Mo 05.10.09 15:15 
Wie lege ich:
ausblenden Delphi-Quelltext
1:
format('%10.2n', [....])					


um einen Wert, der aus der Datenbank kommt?

ausblenden Delphi-Quelltext
1:
fg_protokoll.SetCellText(col_fehl_einzel, i, '  ' + qry_protokoll.FieldByName('stunden').AsString)					

_________________
Es ist soooo flauschig !!!
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 05.10.09 15:17 
ausblenden Delphi-Quelltext
1:
S := Format('%s blabla', [qry_protokoll.FieldByName('stunden').AsString]);					


So?
Dhakiyah Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 327
Erhaltene Danke: 5

Windows 7
Delphi XE2
BeitragVerfasst: Mo 05.10.09 15:21 
Ich dachte so:
ausblenden Delphi-Quelltext
1:
fg_protokoll.SetCellText(col_fehl_einzel, i, '  ' + format('%10.2n',[qry_protokoll.FieldByName('stunden').AsString]))					


Aber das funzt nicht...

Der Wert sind Stunden und die sollen mit 2 Nachkommastellen angezeigt werden.

_________________
Es ist soooo flauschig !!!
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 05.10.09 15:24 
Versuchs mal damit: '%.2n'
Dhakiyah Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 327
Erhaltene Danke: 5

Windows 7
Delphi XE2
BeitragVerfasst: Mo 05.10.09 15:31 
Funzt auch nicht. Irgendwie kommt die Meldung ist nicht anwendbar.

_________________
Es ist soooo flauschig !!!
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 05.10.09 15:34 
Klar, wenn du den Typ als %n angibst, erwartet Format einen Double-Wert.

ausblenden Delphi-Quelltext
1:
  fg_protokoll.SetCellText(col_fehl_einzel, i, '  ' + Format('%10.2n',[qry_protokoll.FieldByName('stunden').AsFloat]))					
Dhakiyah Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 327
Erhaltene Danke: 5

Windows 7
Delphi XE2
BeitragVerfasst: Di 06.10.09 07:17 
FUNZT DANKE :lol: (manchmal komme ich auf die einfachsten Sachen nicht... )

_________________
Es ist soooo flauschig !!!