• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Converting String to date type

Explorer ,
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

I'm trying to post gif files (comic strips) by date based on a series of characters in the name of the file.

For example: a file name is 'ft060618.gif' where the '060618' indicates the year, the month and the day respectively.

I used ReReplaceNoCase() to strip the 'ft' and '.gif' from the string.

Now I have the value '060618' and I need to convert this to a date type so I can list the comic strips by today's date as well as perhaps the last five days worth.

Thanks.

Scott

TOPICS
Advanced techniques

Views

307

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Jul 06, 2006 Jul 06, 2006
The following returns mm/dd/yy

Votes

Translate

Translate
Guest
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

The following returns mm/dd/yy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

CreateDate(left('060618',2),mid('060618,3,2),right('060618',2)).

I think I have creatdate() in the correct order of year,month,day, check
the docs. Obviously using a variable and not the hard coded strings
would be much more versatile.

ScottAtHelloMetro wrote:
> I'm trying to post gif files (comic strips) by date based on a series of
> characters in the name of the file.
>
> For example: a file name is 'ft060618.gif' where the '060618' indicates the
> year, the month and the day respectively.
>
> I used ReReplaceNoCase() to strip the 'ft' and '.gif' from the string.
>
> Now I have the value '060618' and I need to convert this to a date type so I
> can list the comic strips by today's date as well as perhaps the last five days
> worth.
>
> Thanks.
>
> Scott
>
>
>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

LATEST
THANKS!

I tried jdeline's solution and it is just what I needed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation