Solved

Jmail date format

Posted on 2007-11-15
8
262 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
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adobe Acrobat Pro: Is this a known bug? 9 107
Import csv files to MS SQL 5 81
Need help to rewrite script 3 79
Outlook 2013 and Gmail via IMAP all messed up - lost cause?! 8 72
When you send traffic on the network or on wireless it may be in plain text and it may reveal all your passwords and details.  Most programs do not use encryption by default. This is acceptable if you own every device on the network and are sure …
How can MDaemon MRK files and MSG files work together? We can also say that, how worldclient and Outlook connecter works, using both application collectively you can view your mails, contacts, calendar, task, notes. In this article you can unders…
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…

773 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