Start a conversation

Converting Dates

The Scriptcase provides the macro sc_date_conv that is very useful to convert dates in others formats.


Example:


sc_date_conv({date_field},"input_format","output_format");



Here are some examples of the use of this feature:


{date_field} = sc_date_conv({date_field},"yyyy-mm-dd","mmddyyyy");


The code above convert the date "yyyy-mm-dd" to "mmddyyyy"




{date_field} = sc_date_conv({date_field},"db_format","dd/mm/yyyy");


The code above convert the date native(database) to "dd/mm/yyyy"




{date_field} = sc_date_conv({date_field},"dd/mm/yyyy","db_format");

The code above convert the date "dd/mm/yyyy" to database native


The formats of input_format,output_format are:


y - year

m - month

d - day

db_format - database native format

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Amanda Santos (Migrated deleted Agent)

  2. Posted
  3. Updated

Comments