Solved

Jmail date format

Posted on 2007-11-15
8
267 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
Technology Partners: 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 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Microsoft goes to great lengths to ensure that the users don’t encounter issues while working with MS Outlook. But errors are inevitable and can occur when you least expect them. One of such errors which are encountered in Outlook is Error 0x800ccc1…
I didn’t use eM Client for long when I decided to swap to Outlook 2016. The reason for the switch is that it started asking for payment to continue some of its services after one month.   The problems I faced when I didn’t pay were:   I was not …
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…

627 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