Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: String from DateTime in LotusScript
Scott Carpenter 9.Jan.04 03:19 PM a Web browser
Domino Designer -- LotusScript 4.5.6a All Platforms


You wrote:
I don't understand this. Doesn't Year() return an integer, and Cstr() convert integers to strings? Note, however, that the following DOES work... yearStr = Cstr(Year( Today )) But why can't I use my DateTime in place of Today? (In the actual application, my thisDate could be any date. It's not actually going to be Today.)
====================================

How to get around this the simplest way is going to depend a lot on where you'll be getting the date from when you're writing your actual production code. If, for example, you were pulling a datetime from a document it's already stored in the correct format. You could use

yearStr = Cstr ( Year ( doc.MyDate(0) ) )

If you've got it as a text value that you're reading in from somplace, then do the conversion a little differently:

mydate = Cdat ( "01/01/2005" )
yearStr = Cstr ( Year ( mydate ) )

That's the big problem with hypothetical code, it doesn't have the context to give a solid answer that a real-world situation does.



String from DateTime in LotusScript... (marc weber 9.Jan.04)
. . RE: String from DateTime in LotusSc... (Stan Rogers 9.Jan.04)
. . . . RE: String from DateTime in LotusSc... (marc weber 9.Jan.04)
. . . . . . RE: String from DateTime in LotusSc... (Wilson Cone 9.Jan.04)
. . . . . . RE: String from DateTime in LotusSc... (Narasimhan Nall... 9.Jan.04)
. . . . . . . . RE: String from DateTime in LotusSc... (sanjay sathyana... 24.Aug.11)
. . RE: String from DateTime in LotusSc... (Dana S Kolodzie... 9.Jan.04)
. . RE: String from DateTime in LotusSc... (Scott Carpenter... 9.Jan.04)
. . . . RE: String from DateTime in LotusSc... (Wilson Cone 9.Jan.04)
. . RE: String from DateTime in LotusSc... (Morten Hattesen... 10.Jan.04)






  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow