BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: อู๋kokha50 ที่ กรกฎาคม 30, 2008, 15:54:47 PM

หัวข้อ: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: อู๋kokha50 ที่ กรกฎาคม 30, 2008, 15:54:47 PM
พิมพ์ใบนัด แต่ออกมาเป็นปี คศ ในเครื่องคอมที่เป็น Vita
                 ส่วนเครื่องที่เป็น winXp ไม่มีปัญหา ถูกต้องเป็น พศ.
                แก้ d-mmmm-eeee ใน Form-report แล้ว ครับ ในเครื่อง Vita ยังเป็น คศ
                ไม่อยากลง winXP ทับ Vita ครับ ท่านใดรู้ช่วยที่
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: Khuad ที่ กรกฎาคม 30, 2008, 16:01:42 PM
..แก้ที่ตัวรายงานโดยใช้ Report Designer ครับ..

..คลิ๊กขวาตรงวันที่   เลือก DisplayFormat.. เปลี่ยนตัวอักษรตรงปี จาก y  เป็น  e  แทนครับ....
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: อู๋kokha50 ที่ กรกฎาคม 30, 2008, 16:17:39 PM
แก้ไขดังท่าน Khuad แจ้งแล้วครับ เปลี่ยน yyyy -->eeee
เพราะว่า รพ.ผม มีทั้ง windowsXP กับ windwos Vista ครับ

แต่ ผิดที่ windows Vista ที่ออกมา เป็น คศ. ครับ windowsXP เป็น พศ ครับ พอจะมีวิธีแก้ไขไหมครับ
นอกจากผมจะลง windowsXp ทับ Vista เลิกใช้ที่ จุดนัด ครับ ผมมีจุดนัด 3 แห่งต้องแก้ 3 เครื่อง
เสียดาย Vista มากครับ

หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: Khuad ที่ กรกฎาคม 30, 2008, 16:34:55 PM

...พอดีผมเองก็ยังไม่ได้ใช้ Vista ครับ..

...ไม่ทราบว่าใน Vista มี Regional and Language Options เหมือน XP หรือเปล่า ลองตรวจสอบดูครับ แต่ก็ไม่รู้ว่าเกี่ยวกันหรือเปล่านะครับ... :D.....
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: เข้ม ที่ กรกฎาคม 30, 2008, 20:10:54 PM
ครับ ถ้าเป็น vista ใช้ไม่ได้ครับ จะออกมาเป็น ปี ค.ศ. ครับ (อ้าง perjerXXXX)

ไม่เป็นไรหรอกครับ ไม่ได้ใช้เครื่องเราทำงานอยู่แล้ว ใช้แต่ทดสอบ
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: manoi ที่ กรกฎาคม 30, 2008, 20:42:44 PM
ใช้ Variable ช่วยครับ

เขียน code ให้เรียกใช้ Function FormatThaiDate เช่น

Value := formatThaiDate('dd/mm/eeee',date);
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: naj ที่ กรกฎาคม 17, 2009, 21:51:42 PM
ใช้ Variable ช่วยครับ

เขียน code ให้เรียกใช้ Function FormatThaiDate เช่น

Value := formatThaiDate('dd/mm/eeee',date);
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: doramon ที่ กรกฎาคม 17, 2009, 22:31:56 PM
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;
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: thannawe ที่ กรกฎาคม 17, 2009, 22:46:18 PM
อ.อ๊อด ชอบโพส ให้ มึนอยู่เรื่อย -_-"
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: jdadmin1 ที่ กรกฎาคม 17, 2009, 22:51:20 PM
อ้างถึง
อ.อ๊อด ชอบโพส ให้ มึนอยู่เรื่อย -_-"
;D ;D ;D ห้ามเลียนแบบนะครับพี่กิจ ถ้า อ.อ๊อดตัวจริงต้องโพสต์แบบนี้ครับ ;D ;D ;D
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: thannawe ที่ กรกฎาคม 17, 2009, 23:00:25 PM
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท


เอาสิ มึนกับผมไหม  ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: udomchok ที่ กรกฎาคม 17, 2009, 23:47:39 PM
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท


เอาสิ มึนกับผมไหม  ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555


สำบัดสำนวน เหลือรับ'ทาน จริง ๆ
ว่าแต่ยังไม่ได้จอยเนี่ย จอยไหนล่ะ
จอย รินลณี
จอย ศิริลักษณ์
หรือจอย ชวนชื่น 55555555555
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: kookkaija ที่ กรกฎาคม 18, 2009, 08:43:25 AM
 ;D
อ้างถึง
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
ถ้า สำนวนนี้ของท่านกิจ เป็นการสอนการเขียนreport มือใหม่อย่างผม บอกได้เลย การสอนได้ขั้นเทพเลยนะเนี่ย เปรียบเทียบได้เข้าใจได้มากเลย  ;D สอนต่ออีกนิดซิ ว่าทำไม
หมูต้อง=สามชั้น เป็นหมูสามชั้นเลย(ไม่ได้เหรอไม่ต้องมีเครื่องหมาย=)
ไก่=ซี่โครง เป็นซี่โครงเลยไม่ได้เหรอ ;D :D
แล้วถ้าไม่มีand ของสด=วันนี้จะได้มั๊ยครับ
รบกวนสอนต่ออีกนิดนะ :D ;) :)
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: nuttavut ที่ กรกฎาคม 18, 2009, 09:07:37 AM
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท


เอาสิ มึนกับผมไหม  ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555


ทำไปได้......อิอิ... ;D ;D
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ กรกฎาคม 18, 2009, 10:29:07 AM
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท


เอาสิ มึนกับผมไหม  ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555



 ;D ;D ;D ;D ;D ;D
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: atit ที่ กรกฎาคม 20, 2009, 19:11:24 PM
;D
อ้างถึง
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
ถ้า สำนวนนี้ของท่านกิจ เป็นการสอนการเขียนreport มือใหม่อย่างผม บอกได้เลย การสอนได้ขั้นเทพเลยนะเนี่ย เปรียบเทียบได้เข้าใจได้มากเลย  ;D สอนต่ออีกนิดซิ ว่าทำไม
หมูต้อง=สามชั้น เป็นหมูสามชั้นเลย(ไม่ได้เหรอไม่ต้องมีเครื่องหมาย=)หมูมีหลายชนิดทั้งสันนอกสันในใส้ ท่านแม่สั่งชนิด3ชั้น
ไก่=ซี่โครง เป็นซี่โครงเลยไม่ได้เหรอ ;D :Dไก่ก็เช่นกันมีทั้งปีก น่อง ซี่โครงเลยต้องมี= 
แล้วถ้าไม่มีand ของสด=วันนี้จะได้มั๊ยครับ อันนี้ก็สงสัยอยู่เหมือนกันหมูนี่เขาฆ่าก่อนหกทุ่มแล้วมาขายวันนี้จะทำไงดีหรือไม่ต้องซื้อครับท่านกิจ ;D
รบกวนสอนต่ออีกนิดนะ :D ;) :)

ปล แต่ท่านกิจลืมเครื่องหมาย " "หลังเครื่องหมาย= นะครับใช้คำสั่ง Run ฟ้อง error ครับ5555 ;D
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: thannawe ที่ กรกฎาคม 21, 2009, 05:13:59 AM
 ;D :D ;D ขำๆ หน่ะครับ :D ;) :D ;D
หัวข้อ: Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
เริ่มหัวข้อโดย: mini ที่ กรกฎาคม 28, 2009, 19:06:57 PM
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;




แล้วต้องเอาไปใส่ยังงัย ต้องกำหนดอะไรบ้างค่ะ
รบกวนด้วยค่ะ