Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

casting datetime

Posted on 1998-07-08
2
Medium Priority
?
292 Views
Last Modified: 2010-03-19
How do i cast a datetime value to a string? i need to do this in an asp script.
0
Comment
Question by:csheppar
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1091687
If it does not go automatically, you can do it like this:

strDate = Month(dtVar) + "/"  Day(dtVar) + "/" + Year(dtVar)


0
 

Author Comment

by:csheppar
ID: 1091688
that didnt do the trick but i solved it. i just had to use convert. thanks anyways.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

916 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