Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Urgent ! LotusScript: Text to Date

Posted on 2001-08-24
Medium Priority
Last Modified: 2013-12-18
Hi !

Required: date returned in format mm/dd/yyyy (excluding time) of data type Date/Time
eg. 08/24/2001
I need the zero in front of the month and day.

Language used = LotusScipt

I've tried DateNumber and all other date functions available but still can't get it!

Could someone please enlighten me?

Thanks in advance!

Question by:eileener
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
  • 3
  • 3
  • 2
  • +2

Expert Comment

ID: 6421275


doc.newdate = Format(datetochange,"mm/dd/yyyy")

hope this helps..

Author Comment

ID: 6421303
Hi JoeMunguia,

Format(datetochange,"mm/dd/yyyy")will return a date that is String.
I need it to be returned as Date/Time.

Thanks anyways!


Expert Comment

ID: 6421355
Hi eileener,

The way that the date is displayed (for actual date fields, not text fields) is determined by the operating system for Notes clients, and the Domino server for web applications.  I dont think you can change this unless you actually go into control panel and change the format to US.  Is it not possible to display the field that you want as text and use Format() and save the real date value in a hidden field?

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Expert Comment

ID: 6421359
in lotusscript the dates always look the same. where does it have to look in the format mm/dd/yyyy ? If it is in a field you just set the field properties in a view you set the column properties...

Expert Comment

by:Jean Marie Geeraerts
ID: 6421403
A way to convert it to text and displaying the leading zeros is the following :
displayDate = format$(orignalDate, "mm/dd/yyyy")

Where displayDate is a string variable and originalDate is a Variant containing the Date/Time value.


Expert Comment

ID: 6421598
Blah Blah... just to get into this discussion !

Expert Comment

by:Jean Marie Geeraerts
ID: 6427963
What exactly is it that you want to do in LotusScript ?

Author Comment

ID: 6430382
Hi all,

Thanks for your comments.

Basically, this was part of the codes to automate the creation of calendar entries of web stats reports generated.

I needed to pass a Date/Time value of yesterday's date into the hyperlink below and needed it in the format mm/dd/yyyy:

"[<a href=\"" + link+ subject + "/" + type + "/" + directory + "/default.htm\" target=_blank>" + @Text(date) + "</a>]"

I could actually do it without changing the date/time to text, but the time portion would be displayed in the entry.

I wanted to know if there's any way to omit the time portion of the date/time value.

Sorry if I confused everyone. Currently, I just made do with the inclusion of time portion in my date.

This seems so easy yet so tricky.



Accepted Solution

Jean Marie Geeraerts earned 300 total points
ID: 6430850
In stead of the @Text(Date), if you're passing it from LotusScript pass the string value provided by the format$ command. It should work :

e.g. print {<a href=\"} + link + subject + "/" + type + "/" + directory + {/default.htm" target=_blank>} + strDate + "</a>"

Where strDate is a stringvariable containing the date in the required format.
As in my previous comment, you can construct the string date as follows :
   strDate = format$(orignalDate, "mm/dd/yyyy")
I use the curly braces {,} because then you can include double quotes " as if it were regular characters and it makes the code a bit easier to read afterwards.
If you use the print statement to put the link in a dynamically generated HTML-document, you don't need to include the square brackets [,]. If the code puts the string in a field, you do have to add the square brackets [,].

Hope this clears things up for you,


Author Comment

ID: 6451857
Thanks guys!

Featured Post

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!

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

604 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