Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Formating dates in interdev

Posted on 1999-07-18
4
Medium Priority
?
175 Views
Last Modified: 2013-12-25
What control can I bind to a datetime database field using RDS so that I can control the format of the displayed data.  I am using a Textbox control, but I am getting a display of a full datetime value, I want to display a short date value.

Thanks
0
Comment
Question by:garyz31
[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
  • 2
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
moehler earned 200 total points
ID: 1864150
Try using the following vbscript function
formatDateTime(datefield,vbshortdate)

vbshortdate is based on the server's regional settings.
0
 
LVL 1

Author Comment

by:garyz31
ID: 1864151
Am I correct in inferring that I can fix the problem by changing settings on the SQL Server?
0
 
LVL 2

Expert Comment

by:moehler
ID: 1864152
Having not worked with SQL Server, I don't know, but if you are attempting to format to a certain dateformat, the formatDateTime does work.
0
 
LVL 1

Author Comment

by:garyz31
ID: 1864153
formatDateTime Does work, but if control CTL is bound to table field tbl.DateReceived, then I think I have to copy the value to an unbound control in order to use that function.  Sumething like CTL2 = formatDateTime(...)

I was hoping to have the ability to specify the format used by the bound control.

Please correct me if I have misunderstood your suggestion.

Thanks
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

715 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