Select Categories Below
Status: Open Points: 75 Time: 02:42 - Jun 07, 2007
manohar.patil
I have a .asp page in which I declare a dim named as strUpdated, actually it contain the date format in following way 6/5/2007 11:46:38 AM now I want to split this strUpdated in 6/5/2007 11:46 AM this format means I want to remove the second field so please suggest the funtion which help me to do this Or give any user define funtion forward me ? Thank You,
Categories:
Add Categories
When adding more than one category, separate them with commas.
Advertisement
nidhi
Date:: Jun 07, 2007
Time:: 03:28
Is this ASP or ASP.Net? How did u get the date? Is it today's date? You could just use the formatting options to return just the date part otherwise use the Split method and take out the value from subscript 0
Time:: 03:39
this is ASP I get date from stored Procedure, and it may be any date I don't want to change the return format of stored Procedure how do i use the formatting option please give example Thank you
Time:: 03:42
ASP get current date, use DATE() so this returns 6/5/2007 get current time, use TIME() so this returns 11:46:38 get current date/time, use NOW() in ASP u could also try using FormatDateTime eg FormatDateTime('6/5/2007 11:46:38',2) the 2nd parameter 2 means to return the short date format i.e. 6/5/2007 How to use Split Dim sStr sStr = Split('6/5/2007 11:46:38 AM',' ') Response.Write sStr(0) 'returns 6/5/207
Time:: 03:43
Ok, just saw your reply. I was about to post ASP.net version but wont bother now. Ok, if stored procedure returning string, see if it works in FormatDateTime or try Split
Time:: 04:44
It works Thanks for your cooperation But available format does not contain the am pm format so for this need to write funtion? can we do addition or subtraction between time variable(dim t)?
Time:: 05:57
sorry, can u tell me what the exact output you want? do u want '6/5/2007 AM
admin
Date:: Aug 22, 2007
Time:: 20:22
manohar.patil, did you get your question solved? If you did then please close this question and distribute the points. If you found the solution on your own, we would be very happy if you could explain it here for the sake other users having the same problem. If you didn't get a solution to your problem, please leave a comment here to let the experts know that you're still looking for an answer. Thanks, The Quomon Admin Team
shashi.programmer
Date:: Sep 27, 2007
Time:: 04:20
i think this can help you... response.write(FormatDateTime(date(),vbgeneraldate)) /// for date 9/27/2007 response.write(FormatDateTime(now(),vbshorttime)) /// for time 02:50 AM
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
How do I vary the height of a frame depending on t...
Dynamically I created ASP.NET user control using A...
I want to delete a cookie of a different domain fr...
hover gallery.
How long does Google and MSN store emails that can...
Does the United States Government have a CIO posit...
You have 100 characters to use
Rank
Expert
Points
1.
250
2.
225
3.
200
4.
100
5.
65
6.
50
7.
25
8.
10
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software Real Estate Postcards Marketing Fulfillment