Computing.Net > Forums > Programming > Date Formate in Recors set..?

Date Formate in Recors set..?

Reply to Message Icon

Original Message
Name: gardenair
Date: April 15, 2003 at 20:07:51 Pacific
Subject: Date Formate in Recors set..?
OS: win98
CPU/Ram: 166
Comment:

Iam using ADO in my project.In it iam using Date & display it on the Form as

lbl_Date.Caption = Format$(Now, "mmmm dd,yyyy")

This works fine & it shows the date as, Aprial 16,2003 which is correct but when i sent the Date to Recordset i.e 'lbl_Date.Caption = rec.Fields(8) then it Display the Date on the form as
4/16/03
I need the same formate Above i.e Aprial 16,2003 .how can i put the value in the Record set.

rec.MoveFirst 'Moving to the First Record.
lblPid_value.Caption = rec.Fields(0)
txtname.Text = rec.Fields(1)
txtf.Text = rec.Fields(2)
txtAge.Text = rec.Fields(3)
txtSex.Text = rec.Fields(4)
txtCity.Text = rec.Fields(5)
txtAddress.Text = rec.Fields(6)
txtPho_no.Text = rec.Fields(7)
lbl_Date.Caption = rec.Fields(8) --------Logical Error

Thnaks in Advance


Report Offensive Message For Removal

Response Number 1
Name: DTec
Date: April 17, 2003 at 03:53:43 Pacific
Subject: Date Formate in Recors set..?
Reply: (edit)

This should work:

lblPid_Value.Caption= Format(rec.Fields(0),"mmmm,dd,yyyy")


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Date Formate in Recors set..?

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software