Jump to content

convert date from mm/dd/yyyy to yyyy-mm-dd


This topic is 3785 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Do you mean your "dates" are stored in a TEXT field, in the form of "yyyy-mm-dd?

If so, why don't you convert them to real dates, using your file's format of m/d/y - instead of going the other way round? That way you get the full benefits of date manipulations - for example, you can search for dates in a given range.

 

 

The way you have it now, you would need to do:

Enter Find Mode []
Set Field [ YourTable::Textdate; Let ( d = Get(CurrentDate); Year ( d ) & SerialIncrement ( "-00" ; Month ( d ) ) & SerialIncrement ( "-00" ; Day ( d ) ) ) ]
Perform Find[]
  • Like 1
Link to comment
Share on other sites

Thanks.Sorry but actually I want to find records based on timestamp means i want to find only those records which were creaated in last two hours .In this in this if I change format like this Set Variable[$date;Value:Year(Get(CurrentDate))&"-"&Month(Get(CurrentDate))&"-"&Day(Get(CurrentDate))]

This in day and months if its value are below 10 then give o/p 6 instead of "06"..

Link to comment
Share on other sites

I had a thought that perhaps the system date format might have been sett to mm/dd/yyyy. Yesterday a run time wouldn't accept the way I was inputting a date. Upon checking my system settings I found they had changed. Reading this thread back this is likely not related to th op's problem.

Link to comment
Share on other sites

This topic is 3785 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.