ผู้เขียน หัวข้อ: ใบนัดเป็นปี คศ แก้อย่างไรครับ  (อ่าน 15061 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ อู๋kokha50

  • Hero Member
  • *****
  • กระทู้: 1,169
  • อยากได้ความรู้Hosxpต้องลงมือเรียนรู้
  • Respect: 0
    • ดูรายละเอียด
ใบนัดเป็นปี คศ แก้อย่างไรครับ
« เมื่อ: กรกฎาคม 30, 2008, 15:54:47 PM »
0
พิมพ์ใบนัด แต่ออกมาเป็นปี คศ ในเครื่องคอมที่เป็น Vita
                 ส่วนเครื่องที่เป็น winXp ไม่มีปัญหา ถูกต้องเป็น พศ.
                แก้ d-mmmm-eeee ใน Form-report แล้ว ครับ ในเครื่อง Vita ยังเป็น คศ
                ไม่อยากลง winXP ทับ Vita ครับ ท่านใดรู้ช่วยที่
โรงพยาบาลเกาะคา จังหวัดลำปาง โทร 054281393 ต่อ 128 Server : HP Proliant ML150 G3 Xeon 2.0 Ram 16 G  HDDSATA 160 G 2 ตัว CentOS 5.2 Linux MySQL 5.1.30-4percona
HosXp Version 3.55.5.8b
Client : winXP,  Version 3.55.5.8b
 ขึ้นระบบ 1 พ.ค.50

ออฟไลน์ Khuad

  • Hero Member
  • *****
  • กระทู้: 3,778
  • .. นางฟ้า ตัวไม่น้อยแล้ว ..
  • Respect: +10
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #1 เมื่อ: กรกฎาคม 30, 2008, 16:01:42 PM »
0
..แก้ที่ตัวรายงานโดยใช้ Report Designer ครับ..

..คลิ๊กขวาตรงวันที่   เลือก DisplayFormat.. เปลี่ยนตัวอักษรตรงปี จาก y  เป็น  e  แทนครับ....
« แก้ไขครั้งสุดท้าย: กรกฎาคม 30, 2008, 16:06:43 PM โดย Khuad »
โรงพยาบาลวังน้อย   พระนครศรีอยุธยา ( รพช.30 เตียง )
Server : ProLiant DL120G6  Xeon X3450  RDIMM 12 Gb  2x256GB SSD Raid 1
OS : CentOS 6.3  DB : Percona 5.5.21

Slave : ProLiant ML110G6  Xeon X3430  UDIMM 8 Gb  2x300GB SAS Raid 1
OS : CentOS 6.3  DB : Percona 5.5.32

HOSxP version  3.57.xx.xx    เริ่มระบบ  เมษายน 2549

ออฟไลน์ อู๋kokha50

  • Hero Member
  • *****
  • กระทู้: 1,169
  • อยากได้ความรู้Hosxpต้องลงมือเรียนรู้
  • Respect: 0
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #2 เมื่อ: กรกฎาคม 30, 2008, 16:17:39 PM »
0
แก้ไขดังท่าน Khuad แจ้งแล้วครับ เปลี่ยน yyyy -->eeee
เพราะว่า รพ.ผม มีทั้ง windowsXP กับ windwos Vista ครับ

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

« แก้ไขครั้งสุดท้าย: กรกฎาคม 30, 2008, 16:23:48 PM โดย kokha50 »
โรงพยาบาลเกาะคา จังหวัดลำปาง โทร 054281393 ต่อ 128 Server : HP Proliant ML150 G3 Xeon 2.0 Ram 16 G  HDDSATA 160 G 2 ตัว CentOS 5.2 Linux MySQL 5.1.30-4percona
HosXp Version 3.55.5.8b
Client : winXP,  Version 3.55.5.8b
 ขึ้นระบบ 1 พ.ค.50

ออฟไลน์ Khuad

  • Hero Member
  • *****
  • กระทู้: 3,778
  • .. นางฟ้า ตัวไม่น้อยแล้ว ..
  • Respect: +10
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #3 เมื่อ: กรกฎาคม 30, 2008, 16:34:55 PM »
0

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

...ไม่ทราบว่าใน Vista มี Regional and Language Options เหมือน XP หรือเปล่า ลองตรวจสอบดูครับ แต่ก็ไม่รู้ว่าเกี่ยวกันหรือเปล่านะครับ... :D.....
โรงพยาบาลวังน้อย   พระนครศรีอยุธยา ( รพช.30 เตียง )
Server : ProLiant DL120G6  Xeon X3450  RDIMM 12 Gb  2x256GB SSD Raid 1
OS : CentOS 6.3  DB : Percona 5.5.21

Slave : ProLiant ML110G6  Xeon X3430  UDIMM 8 Gb  2x300GB SAS Raid 1
OS : CentOS 6.3  DB : Percona 5.5.32

HOSxP version  3.57.xx.xx    เริ่มระบบ  เมษายน 2549

ออฟไลน์ เข้ม

  • Hero Member
  • *****
  • กระทู้: 2,805
  • Respect: +4
    • ดูรายละเอียด
    • phichit hospital
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #4 เมื่อ: กรกฎาคม 30, 2008, 20:10:54 PM »
0
ครับ ถ้าเป็น vista ใช้ไม่ได้ครับ จะออกมาเป็น ปี ค.ศ. ครับ (อ้าง perjerXXXX)

ไม่เป็นไรหรอกครับ ไม่ได้ใช้เครื่องเราทำงานอยู่แล้ว ใช้แต่ทดสอบ
Phichit Hospital
HOSxP 3.61.10.31 on FreeBSD 9.2
By BMS - Dec 26, 2007

ออฟไลน์ manoi

  • Hero Member
  • *****
  • กระทู้: 8,669
  • Respect: +170
    • ดูรายละเอียด
    • HOSxP Community Center
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #5 เมื่อ: กรกฎาคม 30, 2008, 20:42:44 PM »
0
ใช้ Variable ช่วยครับ

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

Value := formatThaiDate('dd/mm/eeee',date);
HOSxP Project Manager / Cheif Developer / BMS MD

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #6 เมื่อ: กรกฎาคม 17, 2009, 21:51:42 PM »
0
ใช้ Variable ช่วยครับ

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

Value := formatThaiDate('dd/mm/eeee',date);
Yindee And Tan

doramon

  • บุคคลทั่วไป
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #7 เมื่อ: กรกฎาคม 17, 2009, 22:31:56 PM »
0
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;

ออฟไลน์ thannawe

  • Hero Member
  • *****
  • กระทู้: 2,904
  • Respect: +8
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #8 เมื่อ: กรกฎาคม 17, 2009, 22:46:18 PM »
0
อ.อ๊อด ชอบโพส ให้ มึนอยู่เรื่อย -_-"
กิจจา ชาญธัญกรรม
นักวิชาการคอมพิวเตอร์ชำนาญการ รพ.โพธาราม จ.ราชบุรี
็HOSxP XE

ออฟไลน์ jdadmin1

  • Hero Member
  • *****
  • กระทู้: 6,468
  • "เครื่องชำรุด...งดใช้งานชั่วคราว"
  • Respect: +33
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #9 เมื่อ: กรกฎาคม 17, 2009, 22:51:20 PM »
0
อ้างถึง
อ.อ๊อด ชอบโพส ให้ มึนอยู่เรื่อย -_-"
;D ;D ;D ห้ามเลียนแบบนะครับพี่กิจ ถ้า อ.อ๊อดตัวจริงต้องโพสต์แบบนี้ครับ ;D ;D ;D
โรงพยาบาลพระสมุทรเจดีย์สวาทยานนท์ จังหวัดสมุทรปราการ
Master   : HOSxP 3.66.12.28
Slave1   : HOSxP 3.66.12.28
Upgrade 23/12/2566
Facebook : Suntad Mamak

ออฟไลน์ thannawe

  • Hero Member
  • *****
  • กระทู้: 2,904
  • Respect: +8
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #10 เมื่อ: กรกฎาคม 17, 2009, 23:00:25 PM »
0
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

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


เอาสิ มึนกับผมไหม  ;D :D ;D ;) นี่ยังไม่ได้จอยนะ5555
กิจจา ชาญธัญกรรม
นักวิชาการคอมพิวเตอร์ชำนาญการ รพ.โพธาราม จ.ราชบุรี
็HOSxP XE

ออฟไลน์ udomchok

  • Hero Member
  • *****
  • กระทู้: 8,349
  • Respect: +589
    • ดูรายละเอียด
    • ร.พ.สมเด็จพระสังฆราช องค์ที่ 17
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #11 เมื่อ: กรกฎาคม 17, 2009, 23:47:39 PM »
0
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

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


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


สำบัดสำนวน เหลือรับ'ทาน จริง ๆ
ว่าแต่ยังไม่ได้จอยเนี่ย จอยไหนล่ะ
จอย รินลณี
จอย ศิริลักษณ์
หรือจอย ชวนชื่น 55555555555
ทำด้วยหัวใจร.พ.สมเด็จพระสังฆราช องค์ที่ 17 อ.สองพี่น้อง จ.สุพรรณบุรี
อบรมโดย BMS Team เมื่อ พ.ย. 49 ขึ้นระบบห้องบัตรเมื่อ X'Mas 2007
2008 : X-Ray กายภาพบำบัด แพทย์แผนไทย กิจกรรมบำบัด OPD ตา
2009 : ทันตกรรม ห้องตรวจตา OPD (พยาบาลและห้องตรวจแพทย์บางห้อง)

ออฟไลน์ kookkaija

  • Hero Member
  • *****
  • กระทู้: 969
  • kookkaija
  • Respect: +1
    • ดูรายละเอียด
    • โรงพยาบาลดอนตูม
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #12 เมื่อ: กรกฎาคม 18, 2009, 08:43:25 AM »
0
 ;D
อ้างถึง
select หมู,เห็ด,เป็ด,ไก่
from ตลาด
where หมู=สามชั้น and ไก่=ซี่โครง
and ของสด=วันนี้
order by แม่สั่ง
limit 120บาท
ถ้า สำนวนนี้ของท่านกิจ เป็นการสอนการเขียนreport มือใหม่อย่างผม บอกได้เลย การสอนได้ขั้นเทพเลยนะเนี่ย เปรียบเทียบได้เข้าใจได้มากเลย  ;D สอนต่ออีกนิดซิ ว่าทำไม
หมูต้อง=สามชั้น เป็นหมูสามชั้นเลย(ไม่ได้เหรอไม่ต้องมีเครื่องหมาย=)
ไก่=ซี่โครง เป็นซี่โครงเลยไม่ได้เหรอ ;D :D
แล้วถ้าไม่มีand ของสด=วันนี้จะได้มั๊ยครับ
รบกวนสอนต่ออีกนิดนะ :D ;) :)
สุทธิ พรึงลำภู ชื่อเล่น ไก่
โรงพยาบาลดอนตูม อ.ดอนตูม จ.นครปฐม 73150
HOSxP V. 3.58.2 ขึ้นระบบ 1 เมษายน 2552 เภสัชกรนาจ เข็มแข็ง   อาจารย์ ที่ปรึกษา
คลิกที่นี่ เพื่อไปที่ สิ่งที่คุณต้องการ
คลิกที่นี่ เพื่อไปที่ ทดสอบความเร็ว

ออฟไลน์ nuttavut

  • Hero Member
  • *****
  • กระทู้: 2,634
  • Boom-Beam
  • Respect: +15
    • ดูรายละเอียด
    • โรงพยาบาลวิเชียรบุรี
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #13 เมื่อ: กรกฎาคม 18, 2009, 09:07:37 AM »
0
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

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


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


ทำไปได้......อิอิ... ;D ;D
..Wichianburi Hospital  Phetchabun ..
Mr.Nuttavut   System Admin,Programer
Master:: HP DL380 G7 RAM 24GB Raid5 CentOS5.2  Percona 5.1.45
Slave::HP ProLiant ML150G3 Xeon Raid1  CentOS5.2   ,Percona 5.1.45
HOSxP 3.55.7.14, LIS (iLab),PACS
Tel. 0-5692-8169 ต่อ 180  | รพ. ขนาด 150+ เตียง |17 สอ. HOSxP_PCU |BMS Datacenter 18 node |
WWW : http://wichianhos.thaieasydns.com
|..ดูแลห่วงใย ใส่ใจบริการ รักษาได้มาตรฐาน พัฒนางานสู่ความเป็นเลิศ ..|   PDS Project  |  การนำเข้า Script คลิก

ออฟไลน์ มนตรี บอยรักยุ้ยคนเดียว

  • Hero Member
  • *****
  • กระทู้: 5,369
  • Respect: +12
    • ดูรายละเอียด
    • โรงพยาบาลชุมชน ด่านมะขามเตี้ย
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #14 เมื่อ: กรกฎาคม 18, 2009, 10:29:07 AM »
0
เดี๋ยวผมขอฝึกก่อน เดี๋ยวเอามั่ง

เอา mysql ไปก่อน

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


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



 ;D ;D ;D ;D ;D ;D
เริ่ม11พย.2548OPD-Paperlessพร้อมHOSxPลดโลกร้อน
FF-Paperless(รพ.สค.)เริ่ม1ตค2555=100%
IPD-Lesspaper1ตค2560ระบบDmsByNeoNetwork
IPD-Paperless1พ.ค2562ระบบHOSxPXE4
ServerMTOL8.5+MDB-10.4.20,SlaveOL8.5+MDB-10.7.3
LOG=PostgreSQL11,INV=PostgreSQL11

ออฟไลน์ atit

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

ปล แต่ท่านกิจลืมเครื่องหมาย " "หลังเครื่องหมาย= นะครับใช้คำสั่ง Run ฟ้อง error ครับ5555 ;D
"-"           รู้อะไรไม่สู้รู้วิชา รู้จักหาในบอร์ดเป็นยอดคน                   tel 081-3202497 
ความรู้เพียงเล็กน้อย อาจช่วยคนเป็นร้อยแก้ปัญหา
เพราะฉะนั้น อย่ากลัวที่จะบอกสิ่งที่คุณรู้กับคนอื่น แม้จะเป็นเรื่องพื้นๆ ก็ตาม
cen-os 64 bit ,ram 4 g ,my sql 5.1.33
วิธีแนะนำตัวเอง  http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4413.0
ก่อนตั้งกระทู้ใหม่ ลองหาดูกระทู่เก่าก่อนดีบ่? อาจได้คำตอบเร็วกว่าเด้อ   http://hosxp.net/index.php?option=com_smf&Itemid=28&action=search
วิธีขอบคุณผู้ที่ตอบคำถามถูกใจ   http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=8180.0
การเปิดใช้ Server แยก เก็บรูปภาพ/log http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=10169.0
การติดตั้ง mysql http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=11513.0
sql วันละคำกับคุณperjer http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4007.0
8)ยินดีต้อนรับสู่สังคมแห่งการแบ่งปัน- การแบ่งปันทำให้สังคมน่าอยู่- ;Dขอขอบคุณ
- อ.mn ผู้เขียนโปรแกรมดีๆและช่วยขึ้นระบบ
- อ.อ๊อด,อ.นาจ,อ.ขวด,อ.โก้,อ.nutawut,อ.ตั๊ก,อ.JD,อ.กิจ...ที่คอยช่วยเหลือและให้ความรู้
- ทุกท่านที่ช่วย review โปรแกรมทำให้เราได้ใช้โปรแกรมที่สุดยอด(อยากให้เป็นโปรแกรมระดับประเทศเร็วๆจังจะได้ไม่ต้องง้อ สปสช 5555 :D)

ออฟไลน์ thannawe

  • Hero Member
  • *****
  • กระทู้: 2,904
  • Respect: +8
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #16 เมื่อ: กรกฎาคม 21, 2009, 05:13:59 AM »
0
 ;D :D ;D ขำๆ หน่ะครับ :D ;) :D ;D
กิจจา ชาญธัญกรรม
นักวิชาการคอมพิวเตอร์ชำนาญการ รพ.โพธาราม จ.ราชบุรี
็HOSxP XE

ออฟไลน์ mini

  • Jr. Member
  • **
  • กระทู้: 89
  • รพ.งาว
  • Respect: +6
    • ดูรายละเอียด
Re: ใบนัดเป็นปี คศ แก้อย่างไรครับ
« ตอบกลับ #17 เมื่อ: กรกฎาคม 28, 2009, 19:06:57 PM »
0
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;




แล้วต้องเอาไปใส่ยังงัย ต้องกำหนดอะไรบ้างค่ะ
รบกวนด้วยค่ะ
โรงพยาบาลงาว จังหวัดลำปาง (30 เตียง)
HOSxP 3.56.11.19  MySQL 5.5.30
ขึ้นระบบ  1 กุมภาพันธ์ 2552  
 SERVER::IBM x5550 M4  centos 6.4 64 bit RAM 32 GB.
 SLAVE:: HP Proliant DL360 G5 centos 6.4 64bit  RAM  4 GB.
               HDD 146*3 RAID5
SLAVE:: HP Proliant DL360 G5 windows server 2008 RAM  4 GB.
             HDD 146*2 RAID0-1

          
          “ หลังพายุผ่านไป ฟ้าย่อมสดใสเสมอ ”
        “ อย่ายอมแพ้ ถ้าไม่ได้พยายามอย่างเต็มที่ ”