[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

formatting the mssql date/time stamp output

Posted on 2004-09-08
6
Medium Priority
?
326 Views
Last Modified: 2006-11-17
greetings.  i have a particular problem where i need to take the output of an mssql date/time stamp and format it from:

8/18/2004
10:48:10 AM

to

Aug 18

or Aug 18 2004

any ideas?
0
Comment
Question by:nmotion
[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
  • 4
  • 2
6 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 12010471
Sure--use formatDateTime()

For details, please see:

http://www.devguru.com/Technologies/vbscript/quickref/formatdatetime.html

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 12010483
Response.Write(FormatDateTime(Date(),1))

0
 
LVL 1

Author Comment

by:nmotion
ID: 12010569
any way to omit certain parts of the output?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 500 total points
ID: 12010639
Sure, do this:

arrDateParts = Split(FormatDateTime(Date(),1)," ")

Now arrDateParts(0) will hold the long day name,  arrDateParts(1) the long month, arrDateParts(2) the day number and etc.

Just mix and match, i.e. response.write(arrDateParts(1) & " ' arrDateParts(2))

FtB
0
 
LVL 1

Author Comment

by:nmotion
ID: 12010861
Thanks a bunch!!
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 12010884
Glad to have helped,

FtB
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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