•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 330,092 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,250 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 131 | Replies: 1
![]() |
•
•
Join Date: May 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hello All,
I'm having a little problem in witting an SQL statement.
I'm sure there is a simple solution for it but its just not clicking with me!.
Anywayz,
I'm trying to write a statement that in the FROM clause, there is a formula, and i would like to assign conditions to this formula in the WHERE Clause
Ex:
I want the statement to convert the FLD_AS_STRING field (which is in string format) to Date format, and in the same time i want to only view fields that it's FLD_AS_STRING is greater than today's date (after it is converted to Date)?
How can i do that in this statement?
Thanks in advance,
Best Regards
Firas S Assaad
I'm having a little problem in witting an SQL statement.
I'm sure there is a simple solution for it but its just not clicking with me!.
Anywayz,
I'm trying to write a statement that in the FROM clause, there is a formula, and i would like to assign conditions to this formula in the WHERE Clause
Ex:
SELECT DateValue(FLD_AS_STRING) FROM Table1 WHERE ???
I want the statement to convert the FLD_AS_STRING field (which is in string format) to Date format, and in the same time i want to only view fields that it's FLD_AS_STRING is greater than today's date (after it is converted to Date)?
How can i do that in this statement?
Thanks in advance,
Best Regards
Firas S Assaad
Last edited by firas489 : 7 Days Ago at 10:02 am.
sql Syntax (Toggle Plain Text)
SELECT to_date(FLD_AS_STRING, 'dd/mm/yyyy') FROM Table1 WHERE to_date(FLD_AS_STRING, 'dd/mm/yyyy') > sysdate;
Last edited by peter_budo : 4 Days Ago at 7:03 am. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
DaniWeb Marketplace (Sponsored Links)
Similar Threads
- Urgent piece of advice is needed! (Web Developers' Lounge)
- [urgent] Need Help on my Visual C++ (C++)
- Pydoc help, simple question (Python)
- URGENT: JSP - StackOverFlow Error (JSP)
- Urgent Word VBA Assistance (Windows NT / 2000 / XP / 2003)
- Maps in VC++ 6.0 (C++)
- Urgent Help Needed!!!! Plzzz (Java)
- Shell Scripting problem and related awk issues (Shell Scripting)
- Mouse over buttons on .js file? Urgent-help (JavaScript / DHTML / AJAX)
- solvetion of my code. (Java)
Other Threads in the MS SQL Forum
- Previous Thread: Simple query
- Next Thread: select date/time issue


Linear Mode