Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Format date in SQL Query for VB6 app

Posted on 2014-04-30
2
Medium Priority
?
764 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

609 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