?
Solved

Format date in SQL Query for VB6 app

Posted on 2014-04-30
2
Medium Priority
?
737 Views
Last Modified: 2014-04-30
I am trying to pull data from an Oracle database to populate a MSHFlexgrid in a VB6. The date field is showing up at "mm/dd/yyy 00:00:00"

This is my query: "SELECT job, prog, add_edit_date, order_status, edited_by From JOBNO_PROGNO WHERE (ORDER_STATUS = 'A')  ORDER BY prog, job"

Isn't there a way to format the date inside the query?
0
Comment
Question by:lakhi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1300 total points
ID: 40032477
>>Isn't there a way to format the date inside the query?

Yes, use TO_CHAR and a format mask to convert the date to a string:

 "SELECT job, prog, to_char(add_edit_date,'MM/DD/YYYY') add_edit_date, order_status, edited_by From JOBNO_PROGNO WHERE (ORDER_STATUS = 'A')  ORDER BY prog, job"

What format do you want it to appear in?
0
 

Author Closing Comment

by:lakhi
ID: 40032588
Perfect! Just what I was looking for, Thanks
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question