Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting date to YYYY,MM,DD 1

Status
Not open for further replies.

robhc

Technical User
Apr 11, 2008
7
US
Hi:
I have a table with a date field in the format "1/1/2008" and need to use it in a date selection criteria. Unfortunately, you can see the lengths won't be a consistent MMDDYYYY so I don't see a way to totext it and use a mid formula to reconstruct it. Suggestions?

CR - 11 user
 
split({YourField},"/")[1] will return the first portion
split({YourField},"/")[2] will return the second portion
split({YourField},"/")[3] will return the third portion

Does this help?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
If its a date field you can format at YYYYMMDD in custom format of date

Right click -> Format ->custom

Select YMD
In format select year as 1999 month as 03 day as 01

Highlight and delete separators

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top