Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
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.
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
Hi is there a way to retrieve the loop count in XSLT
how do repair this problem: every times i opened my laptop it will suddenly n...
How i get the hp pavilion dv6-3054tx laptop bottom base assembly as a sparepa...
I don't have AOL browser but privacy scan shows hundreds of files/cookies fro...
wireless keyboard has stopped working
need validation controller for textbox in java
You have 100 characters to use
Rank
Expert
Points
1.
10279
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
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