Solved

Jmail date format

Posted on 2007-11-15
8
263 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
  • 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Need helpful information on avoiding losing your Bitcoins to scammers, hackers, or data loss? This article discusses risks of working with Bitcoins and is a follow up to my previous article (http://www.experts-exchange.com/Software/Internet_Email…
Introduction Ever had certain email messages or responses that you find yourself using over and over again? Do you use Google's Gmail system? If so, then this article is here to help you save time by teaching you how to create email templates from …
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…

840 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