Arsip: Format Date tanpa merubah regiional setting

 
user image
more 15 years ago

delphi_warrior

Hi guys... ada cara gak utk format date, spy berlaku untuk semua komponen di aplikasi kita...ky datetimepicker, datetostr, dll aku udah coba pk GetLocaleFormatSettings, tp hanya berlaku utk perintah datetostr aja, sedang utk komponen macam datetimepicker tdk berlaku.. kalo di VFP kan gampang misal tinggal set date ital, mk semua yg berhubungan dgn date akan mengikuti format tsb... Trims
user image
more 15 years ago

mas_kofa

pake ShortDateFormat dan LongDateFormat
user image
more 15 years ago

ImanD

@delphi_warior coba jump kesini sapa tau lebih terbuka lagi http://pascal-id.org/thread/unknown/4510/view-old-thread/
user image
more 15 years ago

herux

hati2 kalo jump-jump. kalo kejauhan bisa nyampai maroko.!! dah beda lagi setting regionalnya ! wakakakk...
user image
more 15 years ago

delphi_warrior

@mas_kofa & @ImanD ShortDateFormat & LongDateFormat kan utk convert sblm dimasukkan ke DB, atau utk showmessage aja maksud sy...agar datetimepicker nya udah langsung ngikuting format date yg kita inginkan itu gimana? selain ngrubah regional settingnya... Trims
user image
more 15 years ago

asiyrob

sepengetahuan saya: ga' bisa ngubah format di DateTimePicker selain dari CPanel regional setting.. Description If DateFormat is set to dfShort, the date is formatted using the short date format specified in the Windows control panel. By default, it appears like this: 3/21/97. If DateFormat is set to dfLong, the date is formatted using the long date format specified in the Windows control panel. By default, it appears like this: Friday, March 21, 1997. (Applies only when Kind is dtkDate.) For custom date formats, set the Format property.
user image
more 15 years ago

ImanD

@delphi_warrior: @mas_kofa & @ImanD ShortDateFormat & LongDateFormat kan utk convert sblm dimasukkan ke DB, atau utk showmessage aja maksud sy...agar datetimepicker nya udah langsung ngikuting format date yg kita inginkan itu gimana? selain ngrubah regional settingnya... Trims
sebenernya saya ga terlalu mengerti maksud @delphi_warrior, ya wis lah saya titik beratkan di BOLD az keh dan kurang setuju dengan pernyataan @asiyrob ini mungkin sample yg akan saya tunjukan u/ merubah TDateTimePicker Format (mudah2an maksudnya bener sesuai yg di harapkan)

uses
  COMMCTRL;
procedure TForm1.FormShow(Sender: TObject);
begin
  DateTime_SetFormat(DateTimePicker1.Handle, PChar('yyyy/MM/dd')); // atw mo di ganti jadi 'dd/MM/yyyy' or what ever lah, xixixi
end;
user image
more 15 years ago

elva_ivana

@delphi_warrior klo sy gak salah tagkep, mungkin maksud nya ada di http://www.geocities.com/elva_ivana/reg_setting.html Semoga membantu
user image
more 15 years ago

delphi_warrior

Trims All terutama @elva_ivana...memang benar itu yg sy maksud... ternyata sy salah meletakkan posisi perubahan global variable nya sekali trims
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com