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

x
?
Solved

Jmail date format

Posted on 2007-11-15
8
Medium Priority
?
270 Views
Last Modified: 2007-11-15
I have a line in an asp page.  jmail

MailObj.appendHTML (rsinput.Fields.Item("AssignEnteredDate").Value)
This causes the date to be displayed in American format when the message arrives.
The access database table shows the date in UK format
How can I change the format to show UK format please?
Many thanks
John
0
Comment
Question by:johnhardy
[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
  • 3
8 Comments
 
LVL 25

Expert Comment

by:Rouchie
ID: 20287794
Capture the date value into a variable first, then extract the appropriate sections of the date and rebuild it...


Dim theDate = rsinput.Fields.Item("AssignEnteredDate").Value
MailObj.appendHTML (Day(theDate) & "/" & Month(theDate) & "/" & Year(theDate))

Open in new window

0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20287799
0
 

Author Comment

by:johnhardy
ID: 20287916
<%
Dim theDate = rsinput.Fields.Item("AssignEnteredDate").ValueMailObj.appendHTML (Day(theDate) & "/" & Month(theDate) & "/" & Year(theDate))
%>
I placed this code near the top of the page but it brings an error
line 5, column 12
Dim theDate = rsinput.Fields.Item("AssignEnteredDate").ValueMailObj.appendHTML (Day(theDate) & "/" & Month(theDate) & "/" & Year(theDate))
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

Expert Comment

by:Rouchie
ID: 20287973
Make sure you are pasting 2 seperate lines of code - your post looks like its somehow combined into 1.

Dim theDate = rsinput.Fields.Item("AssignEnteredDate").Value
MailObj.appendHTML (Day(theDate) & "/" & Month(theDate) & "/" & Year(theDate))

Let me know the error if it persists.
0
 

Author Comment

by:johnhardy
ID: 20288001
Sorry yes I didnt copy it in as I should.
However I still get the error message below looks like it does not like the = sign

line 5, column 12
Dim theDate = rsinput.Fields.Item("AssignEnteredDate").Value
-----------^
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 2000 total points
ID: 20288039
Ah yes another one of my lazy .NET presumptions.

It should be:

Dim theDate
theDate = rsinput.Fields.Item("AssignEnteredDate").Value
MailObj.appendHTML (Day(theDate) & "/" & Month(theDate) & "/" & Year(theDate))
0
 

Author Comment

by:johnhardy
ID: 20288091
Thanks Rouchie
Its now working GREAT!

btw as you have used both is it worth changing from .asp to asp.net?
 
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 20288111
Definitely yes, simply to avoid all the little pitfalls that make life hard with ASP.  The problem is that it works quite differently and has lots more power, so there's quite a steep learning curve.

The tutorials videos on www.asp.net though are a really good place to start should you have a spare few days on your hands :-)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

If you can connect to your internal network or can connect to your router but are not able to connect to the Internet follow these steps in order until the problem is resolved.   1. Right click on the network icon on the task bar and select "Troub…
Zimbra is famous for its platform independency, ability to manage multiple user accounts, easy assimilation with 3rd party applications, social network certification etc. Here, we discuss about how users can move multiple Zimbra user accounts to Exc…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…

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