BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: อู๋kokha50 ที่ กรกฎาคม 30, 2008, 15:54:47 PM
-
พิมพ์ใบนัด แต่ออกมาเป็นปี คศ ในเครื่องคอมที่เป็น Vita
ส่วนเครื่องที่เป็น winXp ไม่มีปัญหา ถูกต้องเป็น พศ.
แก้ d-mmmm-eeee ใน Form-report แล้ว ครับ ในเครื่อง Vita ยังเป็น คศ
ไม่อยากลง winXP ทับ Vita ครับ ท่านใดรู้ช่วยที่
-
..แก้ที่ตัวรายงานโดยใช้ Report Designer ครับ..
..คลิ๊กขวาตรงวันที่ เลือก DisplayFormat.. เปลี่ยนตัวอักษรตรงปี จาก y เป็น e แทนครับ....
-
แก้ไขดังท่าน Khuad แจ้งแล้วครับ เปลี่ยน yyyy -->eeee
เพราะว่า รพ.ผม มีทั้ง windowsXP กับ windwos Vista ครับ
แต่ ผิดที่ windows Vista ที่ออกมา เป็น คศ. ครับ windowsXP เป็น พศ ครับ พอจะมีวิธีแก้ไขไหมครับ
นอกจากผมจะลง windowsXp ทับ Vista เลิกใช้ที่ จุดนัด ครับ ผมมีจุดนัด 3 แห่งต้องแก้ 3 เครื่อง
เสียดาย Vista มากครับ
-
...พอดีผมเองก็ยังไม่ได้ใช้ Vista ครับ..
...ไม่ทราบว่าใน Vista มี Regional and Language Options เหมือน XP หรือเปล่า ลองตรวจสอบดูครับ แต่ก็ไม่รู้ว่าเกี่ยวกันหรือเปล่านะครับ... :D.....
-
ครับ ถ้าเป็น vista ใช้ไม่ได้ครับ จะออกมาเป็น ปี ค.ศ. ครับ (อ้าง perjerXXXX)
ไม่เป็นไรหรอกครับ ไม่ได้ใช้เครื่องเราทำงานอยู่แล้ว ใช้แต่ทดสอบ
-
ใช้ Variable ช่วยครับ
เขียน code ให้เรียกใช้ Function FormatThaiDate เช่น
Value := formatThaiDate('dd/mm/eeee',date);
-
ใช้ Variable ช่วยครับ
เขียน code ให้เรียกใช้ Function FormatThaiDate เช่น
Value := formatThaiDate('dd/mm/eeee',date);
-
function FormatThaiDate(options: string; FDate: TdateTime): string;
var
sd: string;
opt: string;
begin
if (options = 'ddmmyy') then
result := formatdatetime('dd', fdate) +
formatdatetime('mm', fdate) +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'yymmdd' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
formatdatetime('mm', fdate) + formatdatetime('dd', fdate)
else if options = 'dd/mm/yy' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'dd/mm/ee' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'dd/mm/yyyy' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4)
else if options = 'dd/mm/yyyy hh:nn:ss' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4) + ' '
+
formatdatetime('hh:nn:ss', fdate)
else if options = 'yy-mm-dd hh:nn:ss.zzz' then
result := formatdatetime('yy-mm-dd hh:nn:ss.zzz', fdate)
else if options = 'dd-mm-yyyy' then
result := formatdatetime('dd', fdate) + '-' +
formatdatetime('mm', fdate) + '-' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4)
else if options = 'd/m/yyyy' then
result := formatdatetime('d', fdate) + '/' +
formatdatetime('m', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4)
else if options = 'dd mmmm yyyy' then
result := formatdatetime('dd', fdate) + ' ' +
formatdatetime('mmmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd m yyyy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('m', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd mmmm yyyy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd mmm yy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmm', fdate) + ' ' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'd mmmm yy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmmm', fdate) + ' ' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mmmm yyyy' then
result := formatdatetime('mmmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd mmm yyyy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'yyyy' then
result := inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'yy/mm/dd' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
'/' + formatdatetime('mm', fdate) + '/' + formatdatetime('dd', fdate)
else if options = 'mm/yy' then
result := formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'yy/mm' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
'/' + formatdatetime('mm', fdate)
else if options = 'ee' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mmyy' then
result :=
formatdatetime('mm', fdate) +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mm/ee' then
result :=
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'yymm' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
formatdatetime('mm', fdate)
else if options = 'yy' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mm' then
result := formatdatetime('mm', fdate)
else if options = 'yy' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'ee' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'eemmddhhnnss' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
formatdatetime('mmddhhnnss', fdate)
else if options = 'mm' then
result := formatdatetime('mm', fdate)
else if options = 'eeee' then
result := inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if pos('ee', options) = 0 then
begin
if pos('yyyy', options) > 0 then
begin
sd := formatthaidate('eeee', fdate);
opt := replacestr(options, 'yyyy', sd);
result := sysutils.formatdatetime(opt, fdate);
end
else if pos('yy', options) > 0 then
begin
sd := formatthaidate('ee', fdate);
opt := replacestr(options, 'yy', sd);
result := sysutils.formatdatetime(opt, fdate);
end
else if pos('ee', options) > 0 then
begin
if pos('eeee', options) > 0 then
begin
sd := formatthaidate('eeee', fdate);
opt := replacestr(options, 'eeee', sd);
end
else
begin
sd := formatthaidate('ee', fdate);
opt := replacestr(options, 'ee', sd);
end;
result := sysutils.formatdatetime(opt, fdate);
end
else
begin
result := sysutils.formatdatetime(options, fdate);
end;
//result := formatdatetime(options, fdate);
end
else
Messagedlg('Options not found for Format Thaidate function ! ' + options,
mterror, [mbok], 0);
end;
-
อ.อ๊อด ชอบโพส ให้ มึนอยู่เรื่อย -_-"
-
อ.อ๊อด ชอบโพส ให้ มึนอยู่เรื่อย -_-"
;D ;D ;D ห้ามเลียนแบบนะครับพี่กิจ ถ้า อ.อ๊อดตัวจริงต้องโพสต์แบบนี้ครับ ;D ;D ;D
-
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง
เอา mysql ไปก่อน
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
เอาสิ มึนกับผมไหม ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555
-
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง
เอา mysql ไปก่อน
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
เอาสิ มึนกับผมไหม ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555
สำบัดสำนวน เหลือรับ'ทาน จริง ๆ
ว่าแต่ยังไม่ได้จอยเนี่ย จอยไหนล่ะ
จอย รินลณี
จอย ศิริลักษณ์
หรือจอย ชวนชื่น 55555555555
-
;D
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
ถ้า สำนวนนี้ของท่านกิจ เป็นการสอนการเขียนreport มือใหม่อย่างผม บอกได้เลย การสอนได้ขั้นเทพเลยนะเนี่ย เปรียบเทียบได้เข้าใจได้มากเลย ;D สอนต่ออีกนิดซิ ว่าทำไม
หมูต้อง=สามชั้น เป็นหมูสามชั้นเลย(ไม่ได้เหรอไม่ต้องมีเครื่องหมาย=)
ไก่=ซี่โครง เป็นซี่โครงเลยไม่ได้เหรอ ;D :D
แล้วถ้าไม่มีand ของสด=วันนี้จะได้มั๊ยครับ
รบกวนสอนต่ออีกนิดนะ :D ;) :)
-
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง
เอา mysql ไปก่อน
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
เอาสิ มึนกับผมไหม ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555
ทำไปได้......อิอิ... ;D ;D
-
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง
เอา mysql ไปก่อน
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
เอาสิ มึนกับผมไหม ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555
;D ;D ;D ;D ;D ;D
-
;D select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
ถ้า สำนวนนี้ของท่านกิจ เป็นการสอนการเขียนreport มือใหม่อย่างผม บอกได้เลย การสอนได้ขั้นเทพเลยนะเนี่ย เปรียบเทียบได้เข้าใจได้มากเลย ;D สอนต่ออีกนิดซิ ว่าทำไม
หมูต้อง=สามชั้น เป็นหมูสามชั้นเลย(ไม่ได้เหรอไม่ต้องมีเครื่องหมาย=)หมูมีหลายชนิดทั้งสันนอกสันในใส้ ท่านแม่สั่งชนิด3ชั้น
ไก่=ซี่โครง เป็นซี่โครงเลยไม่ได้เหรอ ;D :Dไก่ก็เช่นกันมีทั้งปีก น่อง ซี่โครงเลยต้องมี=
แล้วถ้าไม่มีand ของสด=วันนี้จะได้มั๊ยครับ อันนี้ก็สงสัยอยู่เหมือนกันหมูนี่เขาฆ่าก่อนหกทุ่มแล้วมาขายวันนี้จะทำไงดีหรือไม่ต้องซื้อครับท่านกิจ ;D
รบกวนสอนต่ออีกนิดนะ :D ;) :)
ปล แต่ท่านกิจลืมเครื่องหมาย " "หลังเครื่องหมาย= นะครับใช้คำสั่ง Run ฟ้อง error ครับ5555 ;D
-
;D :D ;D ขำๆ หน่ะครับ :D ;) :D ;D
-
function FormatThaiDate(options: string; FDate: TdateTime): string;
var
sd: string;
opt: string;
begin
if (options = 'ddmmyy') then
result := formatdatetime('dd', fdate) +
formatdatetime('mm', fdate) +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'yymmdd' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
formatdatetime('mm', fdate) + formatdatetime('dd', fdate)
else if options = 'dd/mm/yy' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'dd/mm/ee' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'dd/mm/yyyy' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4)
else if options = 'dd/mm/yyyy hh:nn:ss' then
result := formatdatetime('dd', fdate) + '/' +
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4) + ' '
+
formatdatetime('hh:nn:ss', fdate)
else if options = 'yy-mm-dd hh:nn:ss.zzz' then
result := formatdatetime('yy-mm-dd hh:nn:ss.zzz', fdate)
else if options = 'dd-mm-yyyy' then
result := formatdatetime('dd', fdate) + '-' +
formatdatetime('mm', fdate) + '-' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4)
else if options = 'd/m/yyyy' then
result := formatdatetime('d', fdate) + '/' +
formatdatetime('m', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 1, 4)
else if options = 'dd mmmm yyyy' then
result := formatdatetime('dd', fdate) + ' ' +
formatdatetime('mmmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd m yyyy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('m', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd mmmm yyyy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd mmm yy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmm', fdate) + ' ' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'd mmmm yy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmmm', fdate) + ' ' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mmmm yyyy' then
result := formatdatetime('mmmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'd mmm yyyy' then
result := formatdatetime('d', fdate) + ' ' +
formatdatetime('mmm', fdate) + ' ' +
inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'yyyy' then
result := inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if options = 'yy/mm/dd' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
'/' + formatdatetime('mm', fdate) + '/' + formatdatetime('dd', fdate)
else if options = 'mm/yy' then
result := formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'yy/mm' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
'/' + formatdatetime('mm', fdate)
else if options = 'ee' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mmyy' then
result :=
formatdatetime('mm', fdate) +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mm/ee' then
result :=
formatdatetime('mm', fdate) + '/' +
copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'yymm' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
formatdatetime('mm', fdate)
else if options = 'yy' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'mm' then
result := formatdatetime('mm', fdate)
else if options = 'yy' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'ee' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
else if options = 'eemmddhhnnss' then
result := copy(inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543), 3, 2)
+
formatdatetime('mmddhhnnss', fdate)
else if options = 'mm' then
result := formatdatetime('mm', fdate)
else if options = 'eeee' then
result := inttostr(strtoint(formatdatetime('yyyy', fdate)) + 543)
else if pos('ee', options) = 0 then
begin
if pos('yyyy', options) > 0 then
begin
sd := formatthaidate('eeee', fdate);
opt := replacestr(options, 'yyyy', sd);
result := sysutils.formatdatetime(opt, fdate);
end
else if pos('yy', options) > 0 then
begin
sd := formatthaidate('ee', fdate);
opt := replacestr(options, 'yy', sd);
result := sysutils.formatdatetime(opt, fdate);
end
else if pos('ee', options) > 0 then
begin
if pos('eeee', options) > 0 then
begin
sd := formatthaidate('eeee', fdate);
opt := replacestr(options, 'eeee', sd);
end
else
begin
sd := formatthaidate('ee', fdate);
opt := replacestr(options, 'ee', sd);
end;
result := sysutils.formatdatetime(opt, fdate);
end
else
begin
result := sysutils.formatdatetime(options, fdate);
end;
//result := formatdatetime(options, fdate);
end
else
Messagedlg('Options not found for Format Thaidate function ! ' + options,
mterror, [mbok], 0);
end;
แล้วต้องเอาไปใส่ยังงัย ต้องกำหนดอะไรบ้างค่ะ
รบกวนด้วยค่ะ