Concatenate string and date for DropDownList DataTextField

Joined
Jul 18, 2008
Messages
1
Reaction score
0
I would like to concatenate two dataset fields (String and Date) to appear in a DropDownList, but I don't know how to convert the date to a string, and/or how to format it as "month dd, yyyy".

I've set my DropDownList DataTextField="ddlName"

This is my AccessDataSource SelectCommand (which doesn't work):
SelectCommand='SELECT [Project_Name] + " (" + [Project_Date] +")" AS ddlName FROM [ProjectsTable]'

[Project_Name] = "Project Name"
[Project_Date] = 6/10/2008 12:00:00 AM
I would like my DropDownList text to look like this: "Project Name (Month DD, YYYY)"
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top