|
-
Jun 2nd, 2006, 03:34 AM
#1
Thread Starter
Lively Member
Very simple SQL statement
Hi guys,
I have this select statement
"select date from dimtime"
I would like to display the date into format dd-mm-yyyy
How i can do that.
( I know that is too simple but in oracle database was select to_char(vdate,'dd-mm-yyyy') from dimtime. I do not know in sql)
Best Regards
avgoustinosc
-
Jun 2nd, 2006, 03:38 AM
#2
Hyperactive Member
Re: Very simple SQL statement
VB Code:
CONVERT(char(10), @MyDateTime, 105)
-
Jun 2nd, 2006, 03:40 AM
#3
Re: Very simple SQL statement
A date is a date is a date. You use SQL code to retrieve date values from your database. Date values have no format. They just are. It is only when you want to display a date that it has to be converted to a string and then format becomes an issue. So, what I'm saying is just use your SQL to get your dates from Oracle without any thought of format. When you want to display them in a control on a form, then you need to think about format and it depends what control they're being displayed in as to how to go about it.
-
Jun 2nd, 2006, 03:56 AM
#4
Thread Starter
Lively Member
Re: Very simple SQL statement
Best Regards
avgoustinosc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|