Apr 2, 2004 #1 Ann28 MIS Apr 2, 2004 97 US Hi The date is a in a string format '200301' How do I convert it into valid date format? Thanks a lot
Hi The date is a in a string format '200301' How do I convert it into valid date format? Thanks a lot
Apr 2, 2004 2 #2 vidru Programmer Jul 18, 2003 2,113 US Assuming that your format is YYYYMM, this will return the first date of that month/year: Date(Int(200401/100), 200401 Mod 100, 1) -dave Upvote 0 Downvote
Assuming that your format is YYYYMM, this will return the first date of that month/year: Date(Int(200401/100), 200401 Mod 100, 1) -dave
Apr 2, 2004 #3 vidru Programmer Jul 18, 2003 2,113 US Whoops, missed the "string" part... Date(Int(val({Table.Field})/100), Val({Table.Field) Mod 100, 1) -dave Upvote 0 Downvote
Whoops, missed the "string" part... Date(Int(val({Table.Field})/100), Val({Table.Field) Mod 100, 1) -dave
Apr 2, 2004 #4 synapsevampire Programmer Mar 23, 2002 20,180 US Interesting approach, Dave, a star for creativity. I would have used the brute force: cDate("01/"+mid("200301",5)+"/"+left("200301",4)) -k Upvote 0 Downvote
Interesting approach, Dave, a star for creativity. I would have used the brute force: cDate("01/"+mid("200301",5)+"/"+left("200301",4)) -k
Apr 2, 2004 #5 vidru Programmer Jul 18, 2003 2,113 US Thanks k, I'm all too familiar with that YYYYMM format (we use it for Billing Periods). -dave Upvote 0 Downvote
Apr 2, 2004 #6 synapsevampire Programmer Mar 23, 2002 20,180 US I'd guess that the brute force method is faster since it doesn't do as much, but yours was clever, if not artistic. -k Upvote 0 Downvote
I'd guess that the brute force method is faster since it doesn't do as much, but yours was clever, if not artistic. -k